summaryrefslogtreecommitdiff
path: root/src/i18n/locales.ts
blob: 4192e3fb6a26759082da8f99ef47bd0596fc2f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import type Locale from '../types/Locale';

// Use the magic of TypeScript to guarantee completeness
const localesHash: { [key in Locale]: 1 } = {
  'sco': 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[];