My application supports three languages: en, es, and fr. When I build my (clean, from a template) UWP application, I get the message:
warning PRI257: 0xdef00522 - Resources found for language(s) 'en,es,fr' but no resources found for default language(s): 'en-US'. Change the default language or qualify resources with the default language.
So then I go into the manifest and change the default language from en-US to en-GB and when I recompile I get:
warning PRI257: 0xdef00522 - Resources found for language(s) 'en,es,fr' but no resources found for default language(s): 'en-GB,en-US'. Change the default language or qualify resources with the default language.
What gives? How do I replace the default language in a UWP application so that it doesn't try to find en-US resources?
To remove the warning, you have to update the language in 2 places:
Default language in appxmanifest, which gets saved in the csproj file as
<DefaultLanguage>en-GB</DefaultLanguage>
Neutral assembly language, which is saved in the AssemblyInfo file as
[assembly: NeutralResourcesLanguage("en-GB")]
and can also be changed through the project's properties > assembly information.Next to that, you have to use a full language qualifier (en-US, en-GB, ...) as the default language, as 'en' gets just redirected to en-US as the default language. Other languages can be language-only qualifiers (fr).
Note that specifying your assets with a full qualifier doesn't break other regional languages from using these resources.
Imho it's even better to use the full qualifier as your translation is done in one of the regional languages (quite often the main region), so fr-FR is more accurate to tag your resource file than just fr.