feat: localization (#196)
* Started adding locale translations :) * Added some more translations * Working on translating even more pages * More translations * Added test default locale retrieval * replace `intl.formatMessage` with custom `t` hook * add more translations * improve title syntax * add more translations * translate admin config page * translated error messages * add language selecter * minor fixes * improve language handling * add upcoming languages * add `crowdin.yml` * run formatter --------- Co-authored-by: Steve Tautonico <stautonico@gmail.com>
This commit is contained in:
51
frontend/src/i18n/locales.ts
Normal file
51
frontend/src/i18n/locales.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import danish from "./translations/da";
|
||||
import german from "./translations/de";
|
||||
import english from "./translations/en";
|
||||
import spanish from "./translations/es";
|
||||
import french from "./translations/fr";
|
||||
import portugueze from "./translations/pt";
|
||||
import thai from "./translations/th";
|
||||
import chineseSimplified from "./translations/zh-CN";
|
||||
|
||||
export const LOCALES = {
|
||||
ENGLISH: {
|
||||
name: "English",
|
||||
code: "en",
|
||||
messages: english,
|
||||
},
|
||||
GERMAN: {
|
||||
name: "Deutsch",
|
||||
code: "de",
|
||||
messages: german,
|
||||
},
|
||||
FRENCH: {
|
||||
name: "Français",
|
||||
code: "fr",
|
||||
messages: french,
|
||||
},
|
||||
PORTUGUEZE: {
|
||||
name: "Português",
|
||||
code: "pt",
|
||||
messages: portugueze,
|
||||
},
|
||||
DANISH: {
|
||||
name: "Dansk",
|
||||
code: "da",
|
||||
messages: danish,
|
||||
},
|
||||
THAI: {
|
||||
name: "ไทย",
|
||||
code: "th",
|
||||
messages: thai,
|
||||
},
|
||||
SPANISH: {
|
||||
name: "Español",
|
||||
code: "es",
|
||||
messages: spanish,
|
||||
},
|
||||
CHINESE_SIMPLIFIED: {
|
||||
name: "简体中文",
|
||||
code: "zh-CN",
|
||||
messages: chineseSimplified,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user