## 概要 [タスク 1484: 言語切り替えの仕組みをいれる](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/OMDSDictation/_workitems/edit/1484) - トップ画面での言語切り替え機能を実装しました。 - 英語、ドイツ語、フランス語、スペイン語で切り替えできるようにしています。 ## レビューポイント - 言語切り替えとして機能に不足はないか - デザインは仮組なので対象外 - コンボボックスで言語切り替えできるところのみ確認をお願いします。 ## UIの変更 - 言語切り替え追加 - [Task1484](https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task1484?csf=1&web=1&e=e3lu7p) ## 動作確認状況 - 画面上で言語切り替えできることを確認 ## 補足 - デザインはタグだけの仮組ですので無視してください。
30 lines
567 B
TypeScript
30 lines
567 B
TypeScript
import i18n from "i18next";
|
|
import { initReactI18next } from "react-i18next";
|
|
import en from "./translation/en.json";
|
|
import es from "./translation/es.json";
|
|
import fr from "./translation/fr.json";
|
|
import de from "./translation/de.json";
|
|
|
|
i18n.use(initReactI18next).init({
|
|
resources: {
|
|
en: {
|
|
translation: en,
|
|
},
|
|
de: {
|
|
translation: de,
|
|
},
|
|
fr: {
|
|
translation: fr,
|
|
},
|
|
es: {
|
|
translation: es,
|
|
},
|
|
},
|
|
lng: "en",
|
|
defaultNS: "translation",
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
});
|
|
export default i18n;
|