O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the UI Culture from the LocalizabilityViewModel

The viewmodel exposes a list of CultureName objects via its SupportedCultures property. The list of supported cultures is initialized as shown:

readonly List<CultureInfo> supportedCultures = new List<CultureInfo>                                {                                    new CultureInfo("en-US"),                                    new CultureInfo("fr-FR"),                                    new CultureInfo("ar-AE")                                };

A method called SetCulture is used to change the CurrentCulture and CurrentUICulture of the UI thread, as shown in the following excerpt:

void SetCulture(CultureInfo cultureInfo) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required