Telerik UI for Windows Phone by Progress

Telerik UI for Windows Phone provides a flexible localization mechanism which allows users to localize the controls via code or through the standard approach using resource (.resx) files. One possible way to localize the controls is to provide one unified localization object that contains localized resources for every control in the suite. Another way is to provide localization for the controls per assembly. For example one of the assemblies that are part of the control suite is called Telerik.Windows.Controls.Input.dll and users can provide a discreet localization object only for this assembly by assigning a ResourceManager object to the ResourceManager property of the InputLocalizationManager class.

Localization of strings is also possible by code via the IStringResourceLoader interface. It contains a single GetString() method that accepts a key argument and returns a localized string.

The localization process defines a precedence list which determines the source from which a localized resource will be retrieved. Since localization can be provided both by code and by resx files and on a higher level by a single resource repository or per assembly, the precedence list looks like this:

Please note that the examples in the precedence list below assume that the user is localizing the Telerik.Windows.Controls.Input assembly.

1. Instance string loader object. Example: The user assigns a custom IStringResourceLoader implementation to the InputLocalizationManager.Instance.StringLoader property.

InputLocalizationManager.Instance.StringLoader = new MyStringLoader();

2. Instance resource manager object. Example: The user assigns a custom ResourceManager object to the InputLocalizationManager.Instance.ResourceManager property.

InputLocalizationManager.Instance.ResourceManager = myResourceManager;

3. Static string loader object. Example: The user assigns an IStringLoader implementation to the LocalizationManager.GlobalStringLoader property.

LocalizationManager.GlobalStringLoader = new MyStringLoader();

4. Static resource manager object. Example: The user assigns a ResourceManager object to the LocalizationManager.GlobalResourceManager property.

LocalizationManager.GlobalResourceManager = myResourceManager;

It the user does not use any of those approaches to localize the controls, the values for all the localizable resources in the control suite will be localized with the default culture (en-US).

The first resource repository from the list above is used for a particular resource query if it returns a valid resource. If it is an arbitrary object it must not be null and when is a simple text string it must not be null or empty.