From de86f122320be7a41cd94476c8a9424c7c766b19 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 12 Aug 2023 20:33:36 +0100 Subject: Defines translations for language links --- src/i18n/translations/site.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/i18n/translations/site.ts') diff --git a/src/i18n/translations/site.ts b/src/i18n/translations/site.ts index b414499..66c95cd 100644 --- a/src/i18n/translations/site.ts +++ b/src/i18n/translations/site.ts @@ -1,3 +1,4 @@ +import type Locale from '../../types/Locale'; import type { TranslationsDictionary } from '../../types/TranslationsDictionary'; const siteTranslations = { @@ -17,6 +18,24 @@ const siteTranslations = { sco: () => 'bi', 'en-GB': () => 'by', }, + locale: { + sco: ({ locale }: { locale: Locale }) => { + switch (locale) { + case 'sco': + return 'Scots'; + case 'en-GB': + return 'Inglis'; + } + }, + 'en-GB': ({ locale }: { locale: Locale }) => { + switch (locale) { + case 'sco': + return 'Scots'; + case 'en-GB': + return 'English'; + } + }, + }, }; type Raw = typeof siteTranslations; -- cgit v1.2.3