https://github.com/mathsgod/nuxt-i18n-tc2sc
A Nuxt.js module for automatically converting Traditional Chinese to Simplified Chinese.
https://github.com/mathsgod/nuxt-i18n-tc2sc
nuxt vue-i18n
Last synced: about 2 months ago
JSON representation
A Nuxt.js module for automatically converting Traditional Chinese to Simplified Chinese.
- Host: GitHub
- URL: https://github.com/mathsgod/nuxt-i18n-tc2sc
- Owner: mathsgod
- License: mit
- Created: 2022-11-17T09:47:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T04:13:17.000Z (over 3 years ago)
- Last Synced: 2025-05-13T22:24:23.159Z (about 1 year ago)
- Topics: nuxt, vue-i18n
- Language: JavaScript
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nuxt-i18n-tc2sc
A Nuxt.js module for automatically converting Traditional Chinese to Simplified Chinese.
## Install
Prerequisites: [Nuxt@^2](https://nuxtjs.org/), [@nuxtjs/i18n@^7](https://i18n.nuxtjs.org/)
## Setup
1. Add `nuxt-i18n-tc2sc` dependency to your project
2. Config nuxt.config.js
```js
export default{
...
modules: [
"@nuxtjs/i18n",
"nuxt-i18n-tc2sc"
],
i18n:{
vueI18nLoader: true, //must be true
locales: ['tc', 'sc'],
}
...
}
```
## Example
In some vue page
```vue
{
"tc": {
"hello": "你好嗎?"
}
}
{{ $t('hello') }}
```
It will be converted to "你好吗?" when locale is "sc"