An open API service indexing awesome lists of open source software.

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.

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"