[英]Mobile Firemonkey Application localization
I am trying to build a multilanguage Firemonkey Mobile application for Android using Delphi XE5 update1.我正在尝试使用 Delphi XE5 update1 为 Android 构建多语言 Firemonkey 移动应用程序。
I tried using the TLang component but it seems to be completely broken.我尝试使用 TLang 组件,但它似乎完全损坏了。 Is there another way to code my way to store the multilang strings and bring them up when i have selected a language from my application menu?
是否有另一种方法来编码我的方式来存储多语言字符串并在我从应用程序菜单中选择一种语言时将它们调出?
For simple projects TLang works fine, but you're right: The included "Language Designer" (doubleclick on the TLang component) is not much fun and seems to have many issues.对于简单的项目,TLang 工作正常,但您是对的:包含的“语言设计器”(双击 TLang 组件)不是很有趣,而且似乎有很多问题。
I wrote a tool to handle this issues and enable easy import of extern translated CSV files.我编写了一个工具来处理这个问题,并可以轻松导入 extern 翻译的 CSV 文件。
The progress then:之后的进展:
See TLang converter for more informations.有关更多信息,请参阅TLang 转换器。
For large projects you may also check out some commercial products for translating/localization of Delphi FMX projects like:对于大型项目,您还可以查看一些用于翻译/本地化 Delphi FMX 项目的商业产品,例如:
http://www.sisulizer.de http://www.sisulizer.de
http://www.tsilang.com http://www.tsilang.com
http://www.regulace.org http://www.regulace.org
您可以从 FMX.Types 挂钩CustomTranslateProc: TCustomTranslateProc
以本地化例如对话框按钮,请参阅http://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Types.CustomTranslateProc
You can use GnuGetText, it works fine with FireMonkey.您可以使用 GnuGetText,它适用于 FireMonkey。 You just have to call TranslateComponents in each form's constructor.
您只需要在每个表单的构造函数中调用 TranslateComponents。
Here is a Delphi implementation for GnuGetText: http://dxgettext.po.dk/这是 GnuGetText 的 Delphi 实现: http ://dxgettext.po.dk/
Regarding string extraction: the xfm files are not recognized out of the box.关于字符串提取:无法立即识别 xfm 文件。 You have to rename (or copy) them temporarly to dfm and then run the extraction tool.
您必须暂时将它们重命名(或复制)为 dfm,然后运行提取工具。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.