diff --git a/packages/varlet-ui/src/home/example/locale/en-US.ts b/packages/varlet-ui/src/home/example/locale/en-US.ts new file mode 100644 index 00000000000..c16463693da --- /dev/null +++ b/packages/varlet-ui/src/home/example/locale/en-US.ts @@ -0,0 +1,3 @@ +export default { + title: 'Material design mobile components built for Vue3', +} diff --git a/packages/varlet-ui/src/home/example/locale/index.ts b/packages/varlet-ui/src/home/example/locale/index.ts new file mode 100644 index 00000000000..f8c3b2643a5 --- /dev/null +++ b/packages/varlet-ui/src/home/example/locale/index.ts @@ -0,0 +1,23 @@ +// lib +import _zhCN from '../../../locale/zh-CN' +import _enCN from '../../../locale/en-US' +// mobile example doc +import zhCN from './zh-CN' +import enUS from './en-US' +import { useLocale, add as _add, use as _use } from '../../../locale' + +const { add, use: exampleUse, pack, packs, merge } = useLocale() + +const use = (lang: string) => { + _use(lang) + exampleUse(lang) +} + +export { add, pack, packs, merge, use } + +// lib +_add('zh-CN', _zhCN) +_add('en-US', _enCN) +// mobile example doc +add('zh-CN', zhCN) +add('en-US', enUS) diff --git a/packages/varlet-ui/src/home/example/locale/zh-CN.ts b/packages/varlet-ui/src/home/example/locale/zh-CN.ts new file mode 100644 index 00000000000..00b03b445e7 --- /dev/null +++ b/packages/varlet-ui/src/home/example/locale/zh-CN.ts @@ -0,0 +1,3 @@ +export default { + title: '轻量的Vue3 Material风格移动端组件库', +}