The documentation for checkout UI extensions (ref) and customer account UI extensions (ref) states that:
To choose a translation, Shopify evaluates locale data in the following order of precedence:
The customer locale. Example:
de-DE.The non-regional customer locale. Example:
de.…
However, this behaviour does not actually seem to work. I have an extension with de and en.default translation files. On a store in Austrian German (de-AT), I would expect that the extension is rendered in regionless German (i.e. de), since this is both the documented behaviour, and the standard behaviour for software in general. However, while the checkout itself renders in German, the UI extension renders in English (i.e. using the en.default fallback instead of de).
Interestingly, the behaviour documented for UI extensions is exactly how app blocks behave, so the fact that this doesn’t work on UI extensions feels like a bug, and creates an inconsistent developer experience (we shouldn’t have to provide explicit translation files for all possible regional variants of a language for that language to be supported by our extension). Thanks!