diff options
Diffstat (limited to 'frontend/src/i18n/locales.ts')
| -rw-r--r-- | frontend/src/i18n/locales.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/frontend/src/i18n/locales.ts b/frontend/src/i18n/locales.ts index 7663848..4192e3f 100644 --- a/frontend/src/i18n/locales.ts +++ b/frontend/src/i18n/locales.ts @@ -6,4 +6,11 @@ const localesHash: { [key in Locale]: 1 } = { 'en-GB': 1, }; +// Use the magic of TypeScript to guarantee that the +// default locale is a locale, but also have const +// string type +const defaultLocaleAsLocale: Locale = 'sco'; +const defaultLocale: 'sco' = defaultLocaleAsLocale; + +export { defaultLocale }; export default Object.keys(localesHash) as Locale[];
\ No newline at end of file |
