feat: set up i18n
This commit is contained in:
parent
c258de84a2
commit
8ea083c6d1
2 changed files with 16 additions and 0 deletions
7
src/lang/index.ts
Normal file
7
src/lang/index.ts
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import en from "./translations/en.json";
|
||||||
|
import de from "./translations/de.json";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
en,
|
||||||
|
de,
|
||||||
|
};
|
|
@ -1,12 +1,21 @@
|
||||||
import { createApp } from "vue";
|
import { createApp } from "vue";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
|
import { createI18n } from "vue-i18n";
|
||||||
|
import messages from "./lang";
|
||||||
|
|
||||||
import "normalize.css";
|
import "normalize.css";
|
||||||
import "@/scss/main.scss";
|
import "@/scss/main.scss";
|
||||||
|
|
||||||
|
const i18n = createI18n({
|
||||||
|
locale: "en",
|
||||||
|
fallbackLocale: "en",
|
||||||
|
messages,
|
||||||
|
});
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
|
app.use(i18n);
|
||||||
|
|
||||||
app.mount("body");
|
app.mount("body");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue