locked
[UWP] Adding a single resource for all English locales RRS feed

  • Question

  • Hi,

    Is it possible to add one single resource for all English locales?

    For example, let's say my apps default language is German (de-DE).
    I add strings for en-US. If I run the app on en-UK, will it fall back to German because the language is missing, or will it select any other en-XX?
    If it falls back to German, would it be possible to specify an en resource (en without a specific locale) that it will fall back to if the specific locale doesn't exist.
    So, for example, if I have:

    • de-DE (default)
    • en
    • en-US

    Then Americans would get en-US, all other English speaking regions would get en, and everyone else would get German.
    The reason I ask is because it would be really annoying to enumerate all English locales. The same problem could happen for Portuguese, Spanish, French, German, and more languages. So it seems like a convenient solution would be nice. Is there one, or do I have to enumerate every locale?

    Thanks,
    Tomas

    Wednesday, July 13, 2016 7:27 PM

Answers

  • You just need one except to handle actual resource differences. Windows will cross region match to find something as close to appropriate as possible. For example, my en-ca machine gets en-us resources. For more details see https://msdn.microsoft.com/en-us/windows/uwp/globalizing/manage-language-and-region
    Wednesday, July 13, 2016 8:42 PM