mirror of
https://github.com/coder/code-server.git
synced 2026-05-26 07:08:00 +00:00
* feat: add i18n in login page * fix: add word space and put the app name into the title * fix: remove duplicate replace title * fix: prettier format code * fix: fix typescript check warning * fix: add zh-cn locale file code owner * fix: use existing flag locale to the login page Co-authored-by: Joe Previte <jjprevite@gmail.com>
22 lines
464 B
TypeScript
22 lines
464 B
TypeScript
import i18next, { init } from "i18next"
|
|
import * as en from "./locales/en.json"
|
|
import * as zhCn from "./locales/zh-cn.json"
|
|
|
|
init({
|
|
lng: "en",
|
|
fallbackLng: "en", // language to use if translations in user language are not available.
|
|
returnNull: false,
|
|
lowerCaseLng: true,
|
|
debug: process.env.NODE_ENV === "development",
|
|
resources: {
|
|
en: {
|
|
translation: en,
|
|
},
|
|
"zh-cn": {
|
|
translation: zhCn,
|
|
},
|
|
},
|
|
})
|
|
|
|
export default i18next
|