Reputation: 155
I am trying to build a multilanguage Firemonkey Mobile application for Android using Delphi XE5 update1.
I tried using the TLang component but it seems to be completely broken. 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?
Upvotes: 3
Views: 1936
Reputation: 312
You can hook CustomTranslateProc: TCustomTranslateProc
from FMX.Types to localise for example dialog buttons see http://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Types.CustomTranslateProc
Upvotes: 1
Reputation: 379
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.
I wrote a tool to handle this issues and enable easy import of extern translated CSV files.
The progress then:
See TLang converter for more informations.
For large projects you may also check out some commercial products for translating/localization of Delphi FMX projects like:
http://www.sisulizer.de
http://www.tsilang.com
http://www.regulace.org
Upvotes: 2
Reputation: 1468
You can use GnuGetText, it works fine with FireMonkey. You just have to call TranslateComponents in each form's constructor.
Here is a Delphi implementation for GnuGetText: http://dxgettext.po.dk/
Regarding string extraction: the xfm files are not recognized out of the box. You have to rename (or copy) them temporarly to dfm and then run the extraction tool.
Upvotes: 0