i18n
Description
用于甘特图本地化的一组方法
i18n: GanttInternationalization
Details
The i18n object 提供以下方法:
- addLocale(languageCode, localeObject) - 在 Gantt 中添加一个新的自定义 locale
- languageCode - (string) 一个两字母的语言代码
- localeObject - (object) locale 的对象
- setLocale(localeObject: string|object) - 激活指定的 locale
该方法的参数可以是语言代码:
gantt.i18n.setLocale("fr");
或一个 locale 对象:
gantt.i18n.setLocale({
labels: {
new_task:"new task"
}
});
- getLocale(languageCode : string) - 按语言代码返回一个 locale 对象
Related Guides
Change log
- 在 v7.0 中新增
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.