KO
|
EN
gitlite โ search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
vue-i18n-filter
โ 18
Open GitHub โ
๐ { 'vue-i18n' | t }
Download README (.md)
Explore Similar Repositories
wingpanel-indicator-dropbox
:
Wingpanel Dropbox Indicator
auth-bot
:
Authentication Bot
raf-pool
:
requestAnimationFrame pool to avoid busyness on the thread
mellori_ITX
:
Small Form Factor printable case for AMD Raven Ridge systems
partern
:
่ถฃ่ฏดPHP่ฎพ่ฎกๆจกๅผๅฎ็ฐ๏ผ็ตๅญไนฆไพๅญๆฏjava็๏ผ็จphpๅฎ็ฐ๏ผ
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
vue-i18n-filter
?
Download (.md)
# [Vue-I18n-filter](#) · [](https://github.com/chiaweilee/vue-i18n-filter/blob/master/LICENSE) [](https://www.npmjs.com/package/vue-i18n-filter) [](https://npmcharts.com/compare/vue-i18n-filter?minimal=true) [](https://raw.githubusercontent.com/chiaweilee/vue-i18n-filter/master/) Vue-I18n-filter is a Vue `filter` mix-in for Vue-I18n, which allow you use Vue filter to declare Vue-i18n. ### Installation ``` npm install vue-i18n-filter ``` ```JavaScript import VueI18n from 'vue-i18n' import VueI18nFilter from 'vue-i18n-filter' Vue.use(VueI18n) Vue.use(VueI18nFilter) ``` ### Usage *Vue filters `t`, `te`, `tc` will mixed-in, equal effect with `$t`, `$te`, `$tc` of `vue-i18n`.* *avoid to declare Vue filter name as `t`, `te` or `tc` in component when using Vue-i18n-filter.* #### Basic usage ```vue.js {{ 'ไฝ ๅฅฝ' | t }} // hello ``` ### Example ```JavaScript var message = { ja: { message: { hello: 'ใใใซใกใฏใไธ็', greeting: 'ใใ๏ผ', greeting2: 'ใใ {name}๏ผ', apple: 'ๆๆชใฃใฆใใพใฃใ | one ๆๆช | {count}ใฎๆๆช' } } } ``` ```vue.js {{ 'message.hello' | t }} // ใใใซใกใฏใไธ็ ``` ```vue.js {{ 'message.greeting2' | t({ name: 'kazupon' }) }} // ใใ kazupon๏ผ ``` ```vue.js {{ 'message.hello' | te('en') }} // true ``` ```vue.js {{ 'message.apple' | tc(0) }} // ๆๆชใฃใฆใใพใฃใ ``` ```vue.js {{ 'message.apple' | tc(10, { count: 10 }) }} // 10ใฎๆๆช ``` ### filters chain example *translate and capitalize* ```vue.js {{ 'message.hello' | t | capitalize }} ```