Localize your WinUI 3 app

For more info about the value proposition of localizing your app, see Globalization and localization.

To support multiple languages in a WinUI desktop app, and ensure proper localization of your packaged project, add the appropriate resources to the project (see App resources and the Resource Management System) and declare each supported language in the package.appxmanifest file of your project. When you build the project, the specified languages are added to the generated app manifest (AppxManifest.xml) and the corresponding resources are used.

Note

As an unpackaged WinUI 3 app (see Create your first WinUI 3 project) doesn't contain a package.appxmanifest file, no further action is needed after adding the appropriate resources to the project.

  1. Open the .wapproj's package.appxmanifest in a text editor and locate the following section:

    <Resources>
        <Resource Language="x-generate"/>
    </Resources>
    
  2. Replace the <Resource Language="x-generate"> with <Resource /> elements for each of your supported languages. For example, the following markup specifies that "en-US" and "es-ES" localized resources are available:

    <Resources>
        <Resource Language="en-US"/>
        <Resource Language="es-ES"/>
    </Resources>