Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
OptimizedTranslation
继承: Translation < Resource < RefCounted < Object
经过优化的翻译。
描述
优化后的翻译。它使用实时压缩翻译,因此生成的字典非常小。
出于优化目的,该类不存储未翻译的字符串。因此,Translation.get_message_list() 始终返回一个空数组,而 Translation.get_message_count() 始终返回 0。
方法
generate(from: Translation) |
方法说明
bool generate(from: Translation) 🔗
根据给定的 Translation(翻译)资源,生成并设置一套优化后的翻译。如果操作成功,则返回 true。
注意: from 中的消息不应使用上下文(context)或复数形式。
注意: 此方法旨在编辑器内使用。在导出的项目(即打包发布后的游戏或应用)中调用它不会产生任何效果。