I’m trying to do a simple localization of my app, making it support English (default) and Danish.
I’ve followed the MS tutorial, and I’ve looked at some samples but for some reason the simulator does not show the danish version when I choose danish language as the simulator language.
Here’s what I’ve done:
Added supported culture: dk-DK;
Changed assembly info to use “English” as default.
Added the resource to app.xaml:
<Application.Resources>
<local:LocalizedStrings xmlns:local="clr-namespace:LåneRegnskab" x:Key="LocalizedStrings" />
</Application.Resources>
Added “AppResources.resx” and “AppResources.dk-DK.resx” to project with the strings.
To use the strings I write:
"{Binding Path=LocalizedResources.Title, Source={StaticResource LocalizedStrings}}"
LocalizedStrings class:
public class LocalizedStrings
{
public LocalizedStrings()
{
}
private static AppResources localizedResources = new AppResources();
public AppResources LocalizedResources { get { return localizedResources; } }
}
This all works for the english strings, but they do not change when I’m in danish mode. What am I missing here? 🙁
Thanks to Claus, I solved my problems (I seem to have made all the mistakes getting there) but here’s all the settings that work for me.
I’m supporting English and Spanish and changing the region of the emulator to see it work.
In the .csproj
<SupportedCultures>en;es;</SupportedCultures><– I was being too specific on language hereI also had
AppResources-es.resx<– Rather than .esIn my GamePage.xaml

I made the mistake here of having
LocalisedStringsin both source and Path.In the App.xaml I didn’t add the namespace inline, but the same otherwise.
Hopefully it’s a mistake in one of these steps as it was in my case.