0%

ResourceHelper

1
2
3
4
5
6
var resourceHelper = new ResourceHelper();

// OR

var resourceHelper = new ResourceHelper(new ResourceManager());

GetAllResourcesKeys

1
var getAllResources = resourceHelper.GetAllResourcesKeys();

SetLanguage

1
resourceHelper.SetLanguage("fa");

GetString

1
var value = resourceHelper.GetString("Test");

MVVM Pattern

1
2
3
4
5
6
7
8
services.AddSingleton<IResourceHelper, ResourceHelper>();


public MainViewModel(IResourceHelper resourceHelper)
{
resourceHelper.GetString("Test");
}