mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 11:17:05 +02:00
13 lines
321 B
TypeScript
13 lines
321 B
TypeScript
import { I18nString } from '@blitzkit/core';
|
|
import { DEFAULT_LOCALE } from './strings';
|
|
|
|
export function unwrapper(locale: string) {
|
|
return function (i18nString: I18nString) {
|
|
if (locale in i18nString.locales) {
|
|
return i18nString.locales[locale];
|
|
}
|
|
|
|
return i18nString.locales[DEFAULT_LOCALE];
|
|
};
|
|
}
|