Skip to content

Commit

Permalink
chore: 迁移resources文件
Browse files Browse the repository at this point in the history
  • Loading branch information
lijingchi committed Nov 11, 2021
1 parent 8c8e36c commit d2c377c
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 222 deletions.
1 change: 0 additions & 1 deletion packages/lb-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@sensetime/annotation": "^1.4.5-alpha.1",
"antd": "^4.15.0",
"classnames": "^2.3.0",
"i18next": "^21.3.3",
"lb-utils": "^1.0.0",
"lodash": "^4.17.21",
"react-i18next": "^11.12.0",
Expand Down
221 changes: 0 additions & 221 deletions packages/lb-utils/lib/i18n.ts

This file was deleted.

16 changes: 16 additions & 0 deletions packages/lb-utils/lib/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import i18n from "i18next";
import { initReactI18next } from "react-i18next";

import resources from "./resources.json";

i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
resources,
lng: "cn",
interpolation: {
escapeValue: false,
},
});

export default i18n;
Loading

0 comments on commit d2c377c

Please sign in to comment.