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 the
OLangDict.GetTextFunc
.
OLangDict.GetTextFunc = key =>  localizer.GetString(key);
In our demo this is done in the
Utils/Awesomeconfig.cs
which is called in
Program.cs
. The list of all the possible strings is found in
ODictKey
static 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, the
resx
files can be found in the
Resources
folder. If you want to copy the localization from our demo you'll need: Resources folder, which also has the
SharedVidewLocalizer.cs
SharedResources.cs
found in the root folder and it is required for it to be in root.
Utils/Awesomeconfig.cs
from
Program.cs
copy the #region
Localization services
and
Localization
And don't forget to modify the namespaces for the .cs files to match your project's namespaces.



Comments
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our cookie policy and privacy policy .