Telerik UI for Windows Phone by Progress

The resource manager approach to localization is always second to the string loaders, that is, resource managers have lower precedence than string loaders when it comes down to localized resource resolution. In order to provide a resource manager with localized data users must add a resource (.resx) file to their projects using Telerik UI for Windows Phone.

In order to do that you have to do the following:

1. Right click on your project and then Add -> New Item.

2. Select "Resource File", name your file appropriately and click ok. The default name should be Resource1.

After these two steps, visual studio automatically generates an internal class with the same name as the resource file. This auto-generated class has a ResourceManager property with can be used to provide a source for localized resources. Below are two examples. The first example sets the localization manager for the Telerik Input assembly and the second one sets the global resource manager.

Setting Telerik Input resource manager:

InputLocalizationManager.Instance.ResourceManager = Resource1.ResourceManager;

Setting the global resource manager for all Windows Phone Telerik controls:

LocalizationManager.GlobalResourceManager = Resource1.ResourceManager;

Now if you need the controls from the Input assembly to lookup localized resources from the global manager, you must set the local manager to null, like this:

InputLocalizationManager.Instance.ResourceManager = null;

The keys for each localizable string are located in the default resx file which is inside the controls source code. Each assembly has its own resx file. To browse the default keys and values of the resx files please download the source from your account on the Telerik website.

You need to set the resource managers to null for all assemblies that should use the global resource manager for resource lookup. When the local manager is null, the process that determines which resource source to use will fall back to the global manager. For an explanation of the priority of resource sources see the Overview topic.