summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2023-08-04 18:34:12 +0100
committerJoe Carstairs <jcarstairs@scottlogic.com>2023-08-04 18:34:12 +0100
commit4dea89fa67bf52fff2c4031a19244823aec7493e (patch)
tree67c24b37ce2d7ac5aad7dcfd10a4c751c87b7039 /frontend
parentb558b4e4f13991cf61a77819bddfc0899f428a30 (diff)
Defines a default locale
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/i18n/locales.ts7
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