I'm writing an universal application (but the windows 8 part will be for later). And I need to update the user's language at run-time. To do so I set the 'Windows.Globalization.ApplicationLanguages.primaryLanguageOverride' and reload the page.
Well it's working when I deploy with visual studio. But as soon as I deploy the application with the appxupload via the microsoft tools, then it's not working so fine.
eg the default language of the application is 'en-US' then it will always be available. But if I want to override it by 'fr-FR' and the user does not have the language (fr) in his settings then it will not do anything (again it's working when I deploy with VS). If the user add the language in his settings then it will be ok at the next launch of the application.
Unfortunately it seams that 'Windows.Globalization.ApplicationLanguages.manifestLanguages' (http://msdn.microsoft.com/en-us/library/windows/apps/windows.globalization.applicationlanguages.manifestlanguages?cs-save-lang=1&cs-lang=javascript#code-snippet-1) does not contains all my resources files. And it will depends on the user's settings. Even if I force it in the package.appxmanifest.
<Resources>
<Resource Language="en-US" />
<Resource Language="fr-FR" />
</Resources>
I finally found the solution (thanks to this article)
When you build the package you must set "generate app bundle" to "never". By doing that the application will always contains your languages files (even if the user does not need them)