๐ Internationalization โ
Currently, the chart has two built-in en-US
and zh-CN
. The default language is en-US
. If you need to use other languages, you can refer to the following scheme.
Adding new language โ
Adding new language is accomplished through klinecharts.registerLocale(key, locales)
.
For example, to add traditional Chinese language, you can do this,
typescript
klinecharts.registerLocale('zh-HK', {
time: 'ๆ้๏ผ',
open: '้๏ผ',
high: '้ซ๏ผ',
low: 'ไฝ๏ผ',
close: 'ๆถ๏ผ',
volume: 'ๆไบค้๏ผ',
turnover: 'ๆไบค้ก๏ผ',
change: 'ๆผฒๅน
๏ผ'
})
Use new language โ
After adding new language, you can complete language switching through the chart API init(options)
or setLocale(key)
.