String resources and localization
Relevant tutorials on this topic:
Localization is done through the
resw files in the current project. Normally you would put these files in the
strings/[lang] folder in the
[AppName] project. Resources are then referenced using
See the UWP documentation on localizing strings in your UI.
Resources may be placed in the default scope files
Resources.resw, or in a custom named file. Custom named file content
can be used with the
x:Uid="/myResources/MyResource" format, see how to factor strings into multiple resource files.
Note that the default language can be defined using the
DefaultLanguage msbuild property, using an IETF Language Tag (e.g.
By default, the app will use the operating system's language first, falling back to the
DefaultLanguage second. If you would like to change localization at the app level, you can use the
ApplicationLanguages.PrimaryLanguageOverride = "fr-CA"; // or, any IETF language tag
Note that changing the
PrimaryLanguageOverride will not retroactively update any loaded pages. You will need to reload the page or navigate to a new one.