From 528cfa907a9363962ad5697f2b0880c9df6bf2d6 Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 4 Jan 2021 19:28:41 +0100 Subject: [PATCH] feat(translation): added fr and es --- phone/src/config/default.json | 2 +- phone/src/i18n.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/phone/src/config/default.json b/phone/src/config/default.json index fe6fc4c..b67ea3c 100644 --- a/phone/src/config/default.json +++ b/phone/src/config/default.json @@ -1,6 +1,6 @@ { "cellProvider": "AT&T", - "language": "en_US", + "language": "en", "wallpapers": [ "default.png", "dragon.jpg", diff --git a/phone/src/i18n.ts b/phone/src/i18n.ts index f4ca0de..48901e7 100644 --- a/phone/src/i18n.ts +++ b/phone/src/i18n.ts @@ -1,16 +1,21 @@ import i18n from "i18next"; import { initReactI18next } from "react-i18next"; import en from "./locale/en.json"; +import es from './locale/es.json' +import fr from './locale/fr.json'; +import config from './config/default.json'; const resources = { en, + es, + fr }; i18n .use(initReactI18next) // passes i18n down to react-i18next .init({ resources, - lng: "en", + lng: config.language, keySeparator: false, // we do not use keys in form messages.welcome