defaultLanguage

Sets the default language to use as a final fallback when the requested locale is not available.

Parameters

locale

The locale to use as the default fallback language.


Sets the default language to use as a final fallback when the requested locale is not available.

Parameters

localeTag

A locale string in the format of a language tag (e.g., "en", "fr", "es").


var defaultLanguage: Locale?(source)

The default language to use as a final fallback when the requested locale and its base language are not available. This ensures that users with unsupported languages receive translations from the CDN (in the default language) instead of falling back to native bundled translations.

Example: If a user has locale "zh-CN" and it's not available, but "en" is set as the default language, the app will fetch and display English translations from the CDN rather than using bundled translations.

If null (default), the fallback chain ends with returning null from resolveLocale(), which eventually leads to using TranslationEmpty and bundled translations.