commit
b7fea53107
@ -22,7 +22,11 @@ const options = [
|
|||||||
{
|
{
|
||||||
label: 'English',
|
label: 'English',
|
||||||
key: 'en'
|
key: 'en'
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
label: 'ភាសាខ្មែរ',
|
||||||
|
key: 'km-KH'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
const handleSelect = (key: string) => {
|
const handleSelect = (key: string) => {
|
||||||
language.value = key as I18nType.langType;
|
language.value = key as I18nType.langType;
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import zhCN from './zh-cn';
|
import zhCN from './zh-cn';
|
||||||
import en from './en';
|
import en from './en';
|
||||||
|
import kmKH from './km-KH';
|
||||||
|
|
||||||
const locales = {
|
const locales = {
|
||||||
'zh-CN': zhCN,
|
'zh-CN': zhCN,
|
||||||
en
|
en,
|
||||||
|
'km-KH': kmKH,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LocaleKey = keyof typeof locales;
|
export type LocaleKey = keyof typeof locales;
|
||||||
|
85
src/locales/lang/km-KH.ts
Normal file
85
src/locales/lang/km-KH.ts
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
import type { LocaleMessages } from 'vue-i18n';
|
||||||
|
|
||||||
|
const locale: LocaleMessages<I18nType.Schema> = {
|
||||||
|
message: {
|
||||||
|
system: {
|
||||||
|
title: 'ប្រព័ន្ធគ្រប់គ្រង'
|
||||||
|
},
|
||||||
|
routes: {
|
||||||
|
dashboard: {
|
||||||
|
dashboard: 'ផ្ទាំងទិន្នន័យ',
|
||||||
|
analysis: 'ផ្ទាំងវិភាគ',
|
||||||
|
workbench: 'ផ្ទាំងការងារ'
|
||||||
|
},
|
||||||
|
document: {
|
||||||
|
_value: 'ឯកសារ',
|
||||||
|
vue: 'ឯកសារ Vue',
|
||||||
|
vite: 'ឯកសារ Vite',
|
||||||
|
naive: 'ឯកសារ NaiveUI',
|
||||||
|
project: 'ឯកសារគម្រោង',
|
||||||
|
'project-link': 'ឯកសារគម្រោង(href)'
|
||||||
|
},
|
||||||
|
component: {
|
||||||
|
_value: 'សមាសភាគ',
|
||||||
|
button: 'ប៊ូតុង',
|
||||||
|
card: 'កាត',
|
||||||
|
table: 'តារាង'
|
||||||
|
},
|
||||||
|
plugin: {
|
||||||
|
_value: 'មុខងារជំនួយ',
|
||||||
|
charts: {
|
||||||
|
_value: 'តារាង Chart',
|
||||||
|
echarts: 'តារាង ECharts',
|
||||||
|
antv: 'AntV'
|
||||||
|
},
|
||||||
|
copy: 'ចម្លង',
|
||||||
|
editor: {
|
||||||
|
_value: 'កែប្រែ',
|
||||||
|
quill: 'Quill',
|
||||||
|
markdown: 'Markdown'
|
||||||
|
},
|
||||||
|
icon: 'អាយខន',
|
||||||
|
map: 'ផែនទី',
|
||||||
|
print: 'បោះពុម្ភ',
|
||||||
|
swiper: 'Swiper',
|
||||||
|
video: 'វីដេអូ'
|
||||||
|
},
|
||||||
|
'auth-demo': {
|
||||||
|
_value: 'ឌីមូ Auth',
|
||||||
|
permission: 'បិទ/បើកការអនុញ្ញាត',
|
||||||
|
super: 'Super Auth'
|
||||||
|
},
|
||||||
|
function: {
|
||||||
|
_value: 'មុខងារ',
|
||||||
|
tab: 'ថេបប្រព័ន្ធ'
|
||||||
|
},
|
||||||
|
exception: {
|
||||||
|
_value: 'ករណីពិេសស',
|
||||||
|
403: '403',
|
||||||
|
404: '404',
|
||||||
|
500: '500'
|
||||||
|
},
|
||||||
|
'multi-menu': {
|
||||||
|
_value: 'ម៉ឺនុយពហុដឺក្រេ',
|
||||||
|
first: {
|
||||||
|
_value: 'ដឺក្រេទី១',
|
||||||
|
second: 'ដែក្រេទី២',
|
||||||
|
'second-new': {
|
||||||
|
_value: 'ដឺក្រេទី២មានអនុក្រោម',
|
||||||
|
third: 'ដឺក្រេទី៣'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
management: {
|
||||||
|
_value: 'ការគ្រប់គ្រងប្រព័ន្ធ',
|
||||||
|
auth: 'Auth',
|
||||||
|
role: 'សិទ្ធី',
|
||||||
|
route: 'ផ្លូវប្រព័ន្ធ',
|
||||||
|
user: 'អ្នកប្រើប្រាស់'
|
||||||
|
},
|
||||||
|
about: 'អំពីប្រព័ន្ធ'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default locale;
|
2
src/typings/system.d.ts
vendored
2
src/typings/system.d.ts
vendored
@ -302,7 +302,7 @@ declare namespace App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare namespace I18nType {
|
declare namespace I18nType {
|
||||||
type langType = 'en' | 'zh-CN';
|
type langType = 'en' | 'zh-CN' | 'km-KH';
|
||||||
|
|
||||||
interface Schema {
|
interface Schema {
|
||||||
system: {
|
system: {
|
||||||
|
Loading…
Reference in New Issue
Block a user