Skip to content

Commit b78713a

Browse files
committed
comments
1 parent daa5661 commit b78713a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libs/localization-api/localization.controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ export class UmbLocalizationController<LocalizationSetType extends UmbLocalizati
100100
const locale = new Intl.Locale(lang);
101101
const language = locale?.language.toLowerCase();
102102
const region = locale?.region?.toLowerCase() ?? '';
103+
// TODO: Its a bit of a tight coupling here, as this code relies on localizations begin a map. We should abstract that away. [NL]
104+
// TODO: Currently we don't check if the `lang` is available. We should do that. We could maybe checking if the `lang` is in the `languages` map. [NL]?
103105
const primary = umbLocalizationManager.localizations.get(`${language}-${region}`) as LocalizationSetType;
104106
const secondary = umbLocalizationManager.localizations.get(language) as LocalizationSetType;
105107

0 commit comments

Comments
 (0)