TranslationServer¶
继承: Object
类别: 核心
简要说明¶
管理所有翻译的服务器。
方法¶
无效 |
add_translation ( Translation translation ) |
无效 |
clear ( ) |
get_loaded_locales ( ) const |
|
get_locale ( ) const |
|
get_locale_name ( String locale ) const |
|
无效 |
remove_translation ( Translation translation ) |
无效 |
set_locale ( String locale ) |
描述¶
管理所有翻译的服务器。翻译可以设置为它并从中删除。
方法说明¶
void add_translation ( Translation translation )
添加一个 Translation 资源。
void clear ( )
从所有翻译中清除服务器。
Array get_loaded_locales ( ) const
返回游戏所有加载的区域设置的数组。
String get_locale ( ) const
返回游戏的当前区域设置。
返回区域设置的语言及其变量(例如 "en_US"
会回来 "English (United States)"
)
void remove_translation ( Translation translation )
从服务器中删除给定的转换。
void set_locale ( String locale )
设置游戏的区域设置。
返回给定消息(键)的当前区域设置翻译。