https://github.com/zonble/flutter_open_chinese_convert
Open Chinese Convert for Flutter
https://github.com/zonble/flutter_open_chinese_convert
Last synced: 11 months ago
JSON representation
Open Chinese Convert for Flutter
- Host: GitHub
- URL: https://github.com/zonble/flutter_open_chinese_convert
- Owner: zonble
- License: mit
- Created: 2019-10-22T14:05:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-21T08:52:44.000Z (over 1 year ago)
- Last Synced: 2024-11-21T09:32:57.765Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 502 KB
- Stars: 21
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_open_chinese_convert
[](https://pub.dev/packages/flutter_open_chinese_convert)
[](https://github.com/zonble/flutter_open_chinese_convert/actions/workflows/ci.yml)
[](https://github.com/zonble/flutter_open_chinese_convert/blob/main/LICENSE)
flutter_open_chinese_convert bridges OpenCC (開放中文轉換) to your Flutter
projects. You can use the package to convert Traditional Chinese to Simplified
Chinese, and vise versa.
The package supports various conversion options:
- S2T: Simplified Chinese to Traditional Chinese.
- T2S: Traditional Chinese to Simplified Chinese.
- S2HK: Simplified Chinese to Traditional Chinese (Hong Kong Standard).
- HK2S: Traditional Chinese (Hong Kong Standard) to Simplified Chinese.
- S2TW: Simplified Chinese to Traditional Chinese (Taiwan Standard).
- TW2S: Traditional Chinese (Taiwan Standard) to Simplified Chinese.
- S2TWp: Simplified Chinese to Traditional Chinese (Taiwan Standard) with Taiwanese idiom.
- TW2Sp: Traditional Chinese (Taiwan Standard) to Simplified Chinese with Mainland Chinese idiom.
## Usage
All you need to do is to call `ChineseConverter.convert` with what you wan to
convert and a conversion option. For example:
```dart
import 'package:flutter_open_chinese_convert/flutter_open_chinese_convert.dart';
var text = '鼠标里面的硅二极管坏了,导致光标分辨率降低。';
var result = await ChineseConverter.convert(text, S2TWp());
// 滑鼠裡面的矽二極體壞了,導致游標解析度降低。
```
For further information, please visit:
- [OpenCC Project](https://github.com/BYVoid/OpenCC)
- [SwiftyOpenCC](https://github.com/ddddxxx/SwiftyOpenCC)
- [android-opencc](https://github.com/qichuan/android-opencc)