go back to strings to accept arbitrary culture codes
This commit is contained in:
@@ -30,9 +30,11 @@ export class UmbAppElement extends UmbLitElement {
|
||||
*
|
||||
* @attr
|
||||
* @remarks This is the default culture to use for localization, not the current culture.
|
||||
* @example "en-us"
|
||||
* @example "en"
|
||||
*/
|
||||
@property({ type: String, attribute: 'default-culture' })
|
||||
culture: Intl.BCP47LanguageTag | Intl.Locale = 'en-us';
|
||||
culture: string = 'en-us';
|
||||
|
||||
/**
|
||||
* The base path of the backoffice.
|
||||
|
||||
@@ -62,9 +62,8 @@ export class UmbTranslationRegistry {
|
||||
* Load a language from the extension registry.
|
||||
* @param locale The locale to load.
|
||||
*/
|
||||
loadLanguage(locale: Intl.BCP47LanguageTag | Intl.Locale) {
|
||||
locale = new Intl.Locale(locale);
|
||||
this.#currentLanguage.next(`${locale.language}-${locale.region}`.toLowerCase());
|
||||
loadLanguage(locale: string) {
|
||||
this.#currentLanguage.next(locale.toLowerCase());
|
||||
}
|
||||
|
||||
#addOrUpdateDictionary(
|
||||
|
||||
Reference in New Issue
Block a user