horaceho/tradize

Convert a simplified Chinese string to a traditional Chinese array

Installs: 33

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/horaceho/tradize

v1.1.1 2021-04-27 08:54 UTC

This package is auto-updated.

Last update: 2025-09-27 18:27:43 UTC


README

Convert a simplified Chinese (简体) string to a traditional Chinese (繁體) array of string(s), or inverse.

Installation

composer require horaceho/tradize

Usage examples

简 → 繁

app('tradize')->convert('陈艳丽');

=> [
     "陳豔麗",
     "陳艷麗",
   ]

app('tradize')->convert('张小华');

=> [
     "張小華",
   ]

繁 → 简

app('tradize')->invert('陳艷麗');

=> [
     "陈艳丽",
   ]

Testing

composer test

Credit

BYVoid/OpenCC for data/dictionary/STCharacters.txt and data/dictionary/TSCharacters.txt.

License

The MIT License (MIT)