Localization
The library has a set of strings used by all its components. By default the values are in English. These strings can be localized by setting theOLangDict.GetTextFunc.
OLangDict.GetTextFunc = key => localizer.GetString(key);In our demo this is done in the
Utils/Awesomeconfig.cswhich is called in
Program.cs. The list of all the possible strings is found in
ODictKeystatic class, and you can actually use them in your custom code like this:
@OLangDict.Get(ODictKey.Yes)
Localization in our demo
Our demos are using resource files for localization, theresxfiles can be found in the
Resourcesfolder. If you want to copy the localization from our demo you'll need: Resources folder, which also has the
SharedVidewLocalizer.cs
SharedResources.csfound in the root folder and it is required for it to be in root.
Utils/Awesomeconfig.csfrom
Program.cscopy the #region
Localization servicesand
LocalizationAnd don't forget to modify the namespaces for the .cs files to match your project's namespaces.
Comments