1
votes

I have Portable class library, where I have resx files containing localization strings (Resources.resx, Resources.en.resx, Resources.de.resx ). Then I use this resources in the PCL LocalizationViewModel in this way :

public string SettingsLogin
{
        get { return Resources.Settings_Login; }
}

Language switching code looks like following :

In PCL

CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(lang);
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(lang);
Resources.Culture = new CultureInfo(lang);

In Win8.1 app

Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = lang;

Strings from LocalizationViewModel are consumed in Win8.1 application and it works pretty good, change of the language in the runtime as well.

Problem occurs, when I create App package and install application. When I run installed application, language switch is not working.

In resx files, I use embedded resource build action and I tried all combination of the build action and the "copy to output directory" setting.

Similar project you can find in this article

Do you have any idea what can be the problem?

1
How did you set up your directory structure or file-naming convention? I'm trying to do the same thing but having trouble getting the basic working. - Quarkly

1 Answers

1
votes

See the image linked below. I ran into the same problem, change the setting to Never and it fixes the problem.

SS