forked from Lissy93/dashy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlanguages.js
149 lines (145 loc) · 3.11 KB
/
languages.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// Locales - Import translation files here!
import en from '@/assets/locales/en.json';
import de from '@/assets/locales/de.json';
import nl from '@/assets/locales/nl.json';
import pl from '@/assets/locales/pl.json';
import fr from '@/assets/locales/fr.json';
import sl from '@/assets/locales/sl.json';
import es from '@/assets/locales/es.json';
import it from '@/assets/locales/it.json';
import zhCN from '@/assets/locales/zh-CN.json';
import zhTW from '@/assets/locales/zh-TW.json';
import ar from '@/assets/locales/ar.json';
import hi from '@/assets/locales/hi.json';
import ja from '@/assets/locales/ja.json';
import pt from '@/assets/locales/pt.json';
import ru from '@/assets/locales/ru.json';
import nb from '@/assets/locales/nb.json';
import pirate from '@/assets/locales/zz-pirate.json';
import sv from '@/assets/locales/sv.json';
// Language data - Next register your language by adding it to this list
export const languages = [
{
name: 'English',
code: 'en',
locale: en,
flag: '🇬🇧',
},
{ // German
name: 'Deutsch',
code: 'de',
locale: de,
flag: '🇩🇪',
},
{
name: 'Dutch',
code: 'nl',
locale: nl,
flag: '🇳🇱',
},
{
name: 'polski',
code: 'pl',
locale: pl,
flag: '🇵🇱',
},
{
name: 'Français',
code: 'fr',
locale: fr,
flag: '🇲🇫',
},
{
name: 'Slovenščina',
code: 'sl',
locale: sl,
flag: '🇸🇮',
},
{ // Spanish
name: 'Español',
code: 'es',
locale: es,
flag: '🇪🇸',
},
{ // Italian
name: 'Italiano',
code: 'it',
locale: it,
flag: '🇮🇹',
},
{ // Chinese
name: '简体中文',
code: 'cn',
locale: zhCN,
flag: '🇨🇳',
},
{ // Chinese
name: '繁體中文',
code: 'zh-TW',
locale: zhTW,
flag: '🇹🇼',
},
{ // Arabic
name: 'العربية',
code: 'ar',
locale: ar,
flag: '🇦🇪',
},
{ // Hindi
name: 'नहीं',
code: 'hi',
locale: hi,
flag: '🇮🇳',
},
{ // Japanese
name: '日本語',
code: 'ja',
locale: ja,
flag: '🇯🇵',
},
{ // Portuguese
name: 'Português',
code: 'pt',
locale: pt,
flag: '🇵🇹',
},
{ // Russian
name: 'Русский',
code: 'ru',
locale: ru,
flag: '🇷🇺',
},
{ // Norwegian
name: 'Norsk',
code: 'nb',
locale: nb,
flag: '🇳🇴',
},
{ // Joke Language - Pirate
name: 'Pirate',
code: 'pirate',
locale: pirate,
flag: '🏴☠️',
},
{ // Swedish
name: 'Svenska',
code: 'sv',
locale: sv,
flag: '🇸🇪',
},
];
/**
* Include the following info:
* name - Human readable name for your language (e.g German)
* code - ISO language code (e.g. de)
* locale - The file that you imported above
* flag - A nice emoji flag (optional, e.g. 🇩🇪)
*/
// All done :)
// You can also add your language to /README.md and credit yourself if you like
// Prepare each language for export
const i18nMessages = {};
languages.forEach((lang) => {
i18nMessages[lang.code] = lang.locale;
});
export const messages = i18nMessages;