feat: 新增中英文語言檔案並更新 i18n 配置
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"common": {
|
||||||
|
"ok": "OK",
|
||||||
|
"notice": "Notice"
|
||||||
|
},
|
||||||
|
"components": {},
|
||||||
|
"features": {},
|
||||||
|
"pages": {
|
||||||
|
"home": "Home",
|
||||||
|
"login": {
|
||||||
|
"title": "Test System",
|
||||||
|
"illustrationTitle": "Login Page",
|
||||||
|
"illustrationDescription": "Login to your account",
|
||||||
|
"welcomeText": "Welcome back 👋🏻",
|
||||||
|
"welcomeDescription": "Please enter your account password to login",
|
||||||
|
"organization": "Hyakkaou Private Academy",
|
||||||
|
"accPlaceholder": "Enter account",
|
||||||
|
"passwPlaceholder": "Enter password",
|
||||||
|
"rememberMeLabel": "Remember me",
|
||||||
|
"forgotPasswordText": "Forgot password?",
|
||||||
|
"createAccountPromptText": "Don't have an account?",
|
||||||
|
"createAccountLinkText": "Create an account",
|
||||||
|
"submitText": "Login",
|
||||||
|
"verifyText": "Verify",
|
||||||
|
"captchaPlaceholder": "Enter captcha",
|
||||||
|
"refreshTitle": "Refresh captcha",
|
||||||
|
"alert": {
|
||||||
|
"verifyRequired": "Please complete the captcha first",
|
||||||
|
"verifySuccess": "Verification successful",
|
||||||
|
"verifyFailed": "Verification failed",
|
||||||
|
"loginFailed": "Login failed",
|
||||||
|
"loginSuccess": "Login success!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"common": {
|
||||||
|
"ok": "確定",
|
||||||
|
"notice": "提示"
|
||||||
|
},
|
||||||
|
"components": {},
|
||||||
|
"features": {},
|
||||||
|
"pages": {
|
||||||
|
"home": "首頁",
|
||||||
|
"login": {
|
||||||
|
"title": "測試系統",
|
||||||
|
"illustrationTitle": "這是登入頁",
|
||||||
|
"illustrationDescription": "你可以在這頁登入",
|
||||||
|
"welcomeText": "歡迎回來 👋🏻",
|
||||||
|
"welcomeDescription": "請輸入您的帳號密碼進行登入",
|
||||||
|
"organization": "私立百花王學園",
|
||||||
|
"accPlaceholder": "請輸入帳號",
|
||||||
|
"passwPlaceholder": "請輸入密碼",
|
||||||
|
"rememberMeLabel": "記住帳號",
|
||||||
|
"forgotPasswordText": "忘記密碼?",
|
||||||
|
"createAccountPromptText": "還沒有帳號?",
|
||||||
|
"createAccountLinkText": "註冊帳號",
|
||||||
|
"submitText": "登入",
|
||||||
|
"verifyText": "驗證",
|
||||||
|
"captchaPlaceholder": "請輸入驗證碼",
|
||||||
|
"refreshTitle": "點擊刷新驗證碼",
|
||||||
|
"alert": {
|
||||||
|
"verifyRequired": "請先完成驗證碼",
|
||||||
|
"verifySuccess": "驗證成功",
|
||||||
|
"verifyFailed": "驗證失敗",
|
||||||
|
"loginFailed": "登入失敗",
|
||||||
|
"loginSuccess": "登入成功!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
-12
@@ -1,21 +1,18 @@
|
|||||||
import { createI18n } from 'vue-i18n'
|
import { createI18n } from 'vue-i18n'
|
||||||
|
|
||||||
|
import en from '@/language/en-US.json'
|
||||||
|
import zh from '@/language/zh-TW.json'
|
||||||
|
|
||||||
const messages = {
|
const messages = {
|
||||||
en: {
|
'zh-TW': zh,
|
||||||
message: {
|
'en-US': en,
|
||||||
hello: 'hello world',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ja: {
|
|
||||||
message: {
|
|
||||||
hello: 'こんにちは、世界',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const defaultLocale = localStorage.getItem('locale') ?? 'zh-TW'
|
||||||
|
|
||||||
export default createI18n({
|
export default createI18n({
|
||||||
legacy: false,
|
legacy: false,
|
||||||
locale: 'en',
|
locale: defaultLocale,
|
||||||
fallbackLocale: 'en',
|
fallbackLocale: 'en-US',
|
||||||
messages,
|
messages,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user