简体   繁体   中英

Windows Phone Toolkit localization doesn't work

I couldn't make WPToolkit localization work.

I've downloaded sample app from GitHub and everything Works fine. Then I created new Windows Phone Silverlight Project (targeting WP 8.0) and installed latest WPtoolkit.Kinnara from Nuget and added xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" and <toolkit:ToggleSwitch Header="Test"/> to the MainPage.xaml. And installed app to my phone. Even though my phone's Language and Region settings are all set to Turkish and Turkey, ToggleSwitch content was in English ("On" and "Off") instead of Turkish ("Açık" and "Kapalı").

I've tried setting Language="tr-TR" , setting the project neutral language to tr-TR and adding Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR") and Thread.CurrentThread.CurrentUICulture = new CultureInfo("tr-TR") in App.xaml.cs and none of these worked.

I don't want to write my own converters for these basic stuff. Am I doing something wrong or how can I make this working?

I think that you missed the project supported cultures option for Turkish language. Open project settings and enable your language in the supported cultures list.

Try this .. it explains how Localization can be done. Use Microsoft Multilingual Toolkit. And use the AppResources.resx file to add your text strings and then you can select the languages you want to localize and translate them using the Multilingual Toolkit editor.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM