ProblemYou want to add Localization support but don't know how to do that.
SolutionIf you're publishing your app for various marketplaces, Windows Phone owners will use the app in their local language. As previous experience has told me, building a globalized (English) app won't matter. Localization matters very much!Luckily, Visual Studio makes it very easy for us. When we add Supported Languages, it will create .resx (Resource Files) per language.Let's Add French support to our application. Open Project Properties and select French (France):
The contents of the resource files aren't translated when you do that! So you'll need to edit per added language:
Ok.We created our resource files.But how to use them?
Let's add a Textblock control to our Grid.To display a value from the Resource file, we need to write code such as this:
lbltext.Text = AppResources.Title;
This will show the value of the key named "Title" in the Resource file. So keep in mind; the key can be the same in all resource files, but values need to differ depending on the language.
When we change our language settings from English to French, our textblock control will display the same value we wrote in the French Resource file.That's it! Now we have Localization support for our Windows Phone 8 App.Dont forget that localization is very important for a mobile app.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: