Skip to content

๐ŸŒ 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).