Adventures with PivotViewer – Part 3 Localization

You want to skin your PivotViewer controls but you also need to localize them for your users. The download files contain a full set of resource strings as contained in the assembly ‘System.Windows.Pivot.StringResources’ (1.0.6079.0).

You can override the PivotViewer ResourceManager using the PivotViewer.SetResourceManager() API method to set the external ResourceManager.

[UPDATE] The documentation has moved to: SetResourceManager and the PivotViewer API.

[C#]
System.Windows.Pivot.PivotViewer.SetResourceManager(SampleLocalizedStrings
.ResourceManager);

The PivotViewer control is globalization aware and even custom date formats, such as those shown in Graph View when drilling into DateTime categories, are defined in the resource files:
Silverlight Pivot Control Release Notes: Localization and Globalization

You can localize your PivotViewer application in the same manner as any other Silverlight application. Instructions for creating satellite assemblies can be found here:
How to: Add Resources to a Silverlight-based Application

The collection of resource files includes the following languages for a start:
French / Francaise : fr
German / Deutsch : de
Japanese / 日本語 : ja
Chinese (traditional) / 中文 : zh-CN
Russian / Русский язык : ru

e.g. Russian: ru
CardinalitySortLabel=(количество)
ClearAllFiltersButton=Убрать сортировку
CustomFilterPrompt=Что ищем?
See blog post: Как использовать PivotViewer для Silverlight в реальном проекте (часть I)
… and sample collection: Главная – Рецензии
Notice that Microsoft folks did not do a full translation, notice the ‘(no info)’ …

We can make this a community effort. If you like what you see than pass back corrections and additonal translations and I will post them here. If there is enough interest perhaps we can place the resource files on CodePlex.

[UPDATE] The full set of string resources finally got published by Microsoft here: Pivot_Internal_StringResources_Resources

Enjoy!

Download the resource files: PVSampleResx.zip

Advertisements

6 responses to “Adventures with PivotViewer – Part 3 Localization

  1. Can we download sample code for localization ?

    Thanks

  2. Pingback: Adventures with PivotViewer Part 8: Filter pane tooltips | Xpert360 Ltd Development Blog

  3. Pingback: Adventures with PivotViewer Part 9: Multi-Layered Trading Cards | Xpert360 Ltd Development Blog

  4. Pingback: Xpert360 PivotViewer Blog Article Index | Xpert360 Ltd Development Blog

  5. Thanks!

  6. Hello,

    I would like download the PVSampleResx.zip but the link is broken.
    Where could I find it?

    Thanks,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s