-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathi18n.ts
More file actions
33 lines (30 loc) · 1.01 KB
/
i18n.ts
File metadata and controls
33 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import en from '../content/i18n/en.json';
import de from '../content/i18n/de.json';
import da from '../content/i18n/da.json';
import fr from '../content/i18n/fr.json';
import pt from '../content/i18n/pt.json';
import es from '../content/i18n/es.json';
import tr from '../content/i18n/tr.json';
export const starlightLocales = {
root: { label: 'English', lang: 'en' },
'de': { label: 'Deutsch', lang: 'de' },
'da': { label: 'Dansk', lang: 'da' },
'fr': { label: 'Français', lang: 'fr' },
'pt': { label: 'Português (Portugal)', lang: 'pt-PT' },
'es': { label: 'Español', lang: 'es-ES' },
'tr': { label: 'Türkçe', lang: 'tr-TR' },
} as const;
export type SidebarTranslationKey = keyof typeof en.sidebar;
export function sidebarLabel(key: SidebarTranslationKey) {
return {
label: en.sidebar[key],
translations: {
'de': de.sidebar[key],
'da': da.sidebar[key],
'fr': fr.sidebar[key],
'pt': pt.sidebar[key],
'es': es.sidebar[key],
'tr': tr.sidebar[key],
},
};
}