init
This commit is contained in:
26
src/main.ts
Normal file
26
src/main.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { createApp } from 'vue';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import App from './App.vue';
|
||||
import './style.css';
|
||||
|
||||
const i18n = createI18n({
|
||||
locale: 'zh',
|
||||
fallbackLocale: 'en',
|
||||
messages: {
|
||||
en: {
|
||||
message: {
|
||||
hello: 'hello world',
|
||||
},
|
||||
},
|
||||
zh: {
|
||||
message: {
|
||||
hello: '你好 世界',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(i18n);
|
||||
|
||||
app.mount('#app');
|
||||
Reference in New Issue
Block a user