工具 / LanguageUtil
LanguageUtil Class
多语言工具
Table of contents
Methods
getLocTextValue(textkey: string): string |
|---|
| 根据key获取翻译内容 |
locText(textkey: string): string |
| 多语言标记 |
useLocalizedLanguage(type: LanguageType): boolean |
| 游戏语言设置 |
Methods
getLocTextValue
• Static getLocTextValue(textkey): string
根据key获取翻译内容
Parameters
textkey string | 需要查找的翻译的 key range: 不做限制 |
|---|
Returns
string | 返回Key对应的当前语言环境的翻译内容 |
|---|
locText
• Static locText(textkey): string
多语言标记
Parameters
textkey string | 用户多语言配置表收集的 Key range: 不做限制 |
|---|
Returns
string | 返回Key,此函数只用于做翻译文本收集标识。 |
|---|
useLocalizedLanguage
• Static useLocalizedLanguage(type): boolean
游戏语言设置
Parameters
type LanguageType | 切换游戏语言种类 |
|---|
Returns
boolean | true修改成功 false修改失败 |
|---|