Skip to content

Commit

Permalink
fix(home): add locale
Browse files Browse the repository at this point in the history
  • Loading branch information
34982452 authored and haoziqaq committed May 27, 2021
1 parent 74fd8d4 commit e0b7155
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/varlet-ui/src/home/example/locale/en-US.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
title: 'Material design mobile components built for Vue3',
}
23 changes: 23 additions & 0 deletions packages/varlet-ui/src/home/example/locale/index.ts
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions packages/varlet-ui/src/home/example/locale/zh-CN.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
title: '轻量的Vue3 Material风格移动端组件库',
}

0 comments on commit e0b7155

Please sign in to comment.