This repository was archived by the owner on Nov 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/packages/core/localization/registry Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function addOrUpdateDictionary(
2222}
2323
2424export class UmbLocalizationRegistry {
25- #currentLanguage = new UmbStringState ( document . documentElement . lang ?? 'en-us' ) ;
25+ #currentLanguage = new UmbStringState ( document . documentElement . lang !== '' ? document . documentElement . lang : UMB_DEFAULT_LOCALIZATION_CULTURE ) ;
2626 readonly currentLanguage = this . #currentLanguage. asObservable ( ) ;
2727
2828 #loadedExtAliases: Array < string > = [ ] ;
@@ -37,7 +37,7 @@ export class UmbLocalizationRegistry {
3737 constructor ( extensionRegistry : UmbBackofficeExtensionRegistry ) {
3838 combineLatest ( [ this . currentLanguage , extensionRegistry . byType ( 'localization' ) ] ) . subscribe (
3939 async ( [ currentLanguage , extensions ] ) => {
40- const locale = new Intl . Locale ( currentLanguage ? currentLanguage : UMB_DEFAULT_LOCALIZATION_CULTURE ) ;
40+ const locale = new Intl . Locale ( currentLanguage ) ;
4141 const filteredExt = extensions . filter (
4242 ( ext ) =>
4343 ext . meta . culture . toLowerCase ( ) === locale . baseName . toLowerCase ( ) ||
You can’t perform that action at this time.
0 commit comments