,

The Resx Localizability Sample

The source code for this sample is located in the Localizability directory of the WPUnleashed.Examples project, in the downloadable sample code.

The sample for this chapter demonstrates how to leverage resource files to support multiple UI languages. The interface allows the user to set the application thread’s culture value via a ListBox (see Figure 19.4). The interface includes fields to demonstrate the various culture-dependent data formats, such as currency, as well as demonstrating the use of a localizable image.

Image

FIGURE 19.4 The Localizability sample demonstrates how to change the UI language at runtime.

Selecting a language endonym (name) changes the app’s culture, and results in the image being replaced and the data format fields being updated to reflect the new selection.


Note

An endonym refers to the name of a language that is used by speakers of the language in the language itself.



Best Practice

Allow users to switch languages using endonyms. It makes little sense to display a pick list of languages and/or cultures, where the names are displayed in the current interface language. Odds are that if you are seeking to change the interface language, it is because you are having difficulty understanding it. If the interface language happens to be in Japanese, for example, and you are unable to read Japanese, being shown a list of languages to pick from in Japanese is not helpful. This is an all too common UI faux pas.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.205.169