diff --git a/Sras.md b/Sras.md new file mode 100644 index 00000000..75c52f28 --- /dev/null +++ b/Sras.md @@ -0,0 +1 @@ +Test Sync diff --git a/src/layouts/common/global-header/components/toggle-lang.vue b/src/layouts/common/global-header/components/toggle-lang.vue index d5e8e2f9..75ee178f 100644 --- a/src/layouts/common/global-header/components/toggle-lang.vue +++ b/src/layouts/common/global-header/components/toggle-lang.vue @@ -22,7 +22,11 @@ const options = [ { label: 'English', key: 'en' - } + }, + { + label: 'ភាសាខ្មែរ', + key: 'km-KH' + } ]; const handleSelect = (key: string) => { language.value = key as I18nType.langType; diff --git a/src/locales/lang/index.ts b/src/locales/lang/index.ts index baf3eb71..5d8882a4 100644 --- a/src/locales/lang/index.ts +++ b/src/locales/lang/index.ts @@ -1,9 +1,11 @@ import zhCN from './zh-cn'; import en from './en'; +import kmKH from './km-KH'; const locales = { 'zh-CN': zhCN, - en + en, + 'km-KH': kmKH, }; export type LocaleKey = keyof typeof locales; diff --git a/src/locales/lang/km-KH.ts b/src/locales/lang/km-KH.ts new file mode 100644 index 00000000..f6ebf661 --- /dev/null +++ b/src/locales/lang/km-KH.ts @@ -0,0 +1,85 @@ +import type { LocaleMessages } from 'vue-i18n'; + +const locale: LocaleMessages = { + 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; diff --git a/src/typings/system.d.ts b/src/typings/system.d.ts index 949f82ef..153ae90e 100644 --- a/src/typings/system.d.ts +++ b/src/typings/system.d.ts @@ -302,7 +302,7 @@ declare namespace App { } declare namespace I18nType { - type langType = 'en' | 'zh-CN'; + type langType = 'en' | 'zh-CN' | 'km-KH'; interface Schema { system: {