From 2852649d72355191c57eeb106b9f0f9f99577579 Mon Sep 17 00:00:00 2001 From: Rémy Raes Date: Thu, 30 Mar 2023 17:12:44 +0200 Subject: refactor: Convert localization files from TypeScript to JSON format (#253) * refactor: convert localization files from TypeScript to JSON format * docs: update i18n documentation --- docs/DEVELOPMENT.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 94c1bac7..ce6ba010 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -208,9 +208,9 @@ For FlightCore to be used by the largest number, its interface is translated in Localization files are located in `src-vue/src/i18n/lang`. -To add a new language, you have to create associated file, *e.g. `src-vue/src/i18n/lang/de.ts`*, and import it in the i18n application object in `main.ts`: +To add a new language, you have to create associated file, *e.g. `src-vue/src/i18n/lang/de.json`*, and import it in the i18n application object in `main.ts`: ```javascript -import de from "./i18n/lang/de"; +import de from "./i18n/lang/de.json"; export const i18n = createI18n({ locale: 'en', @@ -269,11 +269,11 @@ i18n.global.tc('notification.game_folder.new.text'); It is possible to inject variables into translations: -```javascript -channels: { - release: { - component: { - text: "Switched release channel to {canal}." +```json +"channels": { + "release": { + "component": { + "text": "Switched release channel to {canal}." } } } -- cgit v1.2.3