diff --git a/docs/src/en/guide/in-depth/locale.md b/docs/src/en/guide/in-depth/locale.md index 549bc83f..d186c1f6 100644 --- a/docs/src/en/guide/in-depth/locale.md +++ b/docs/src/en/guide/in-depth/locale.md @@ -60,25 +60,23 @@ To add new translation texts, simply find `src/locales/langs/` in the correspond **src/locales/langs/zh-CN/\*.json** -````ts ```json { "about": { "desc": "Vben Admin 是一个现代的管理模版。" } } -```` +``` -**src/locales/langs/en-US.ts** +**src/locales/langs/en-US/\*.json** -````ts ```json { "about": { "desc": "Vben Admin is a modern management template." } } -```` +``` ## Using Translation Texts @@ -91,11 +89,11 @@ With `@vben/locales`, you can easily use translation texts: import { computed } from 'vue'; import { $t } from '@vben/locales'; -const items = computed(() => [{ title: $t('about.desc') }]); +const items = computed(() => [{ title: $t('demos.title') }]);