mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
fix: translation without reloading (#1215)
* fix: translation without reloading * fix: language switch
This commit is contained in:
@ -23,6 +23,7 @@ import ja from "./locales/ja/data.json";
|
||||
import es from "./locales/es/data.json";
|
||||
import * as Conf from "./Conf";
|
||||
import * as Setting from "./Setting";
|
||||
import {initReactI18next} from "react-i18next";
|
||||
|
||||
const resources = {
|
||||
en: en,
|
||||
@ -80,7 +81,7 @@ function initLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
i18n.init({
|
||||
i18n.use(initReactI18next).init({
|
||||
lng: initLanguage(),
|
||||
|
||||
resources: resources,
|
||||
|
Reference in New Issue
Block a user