Difference between revisions of "Talk:Translations / i18n / localizations for programs"

From Free Pascal wiki
Jump to navigationJump to search
(Can you only use Lazarus resources or also windows resources?)
 
(Added TranslateUnitResourceStrings caution)
 
Line 3: Line 3:
  
 
--[[User:BigChimp|BigChimp]] 16:30, 27 February 2013 (UTC)
 
--[[User:BigChimp|BigChimp]] 16:30, 27 February 2013 (UTC)
 +
 +
== TranslateUnitResourceStrings defined in two modules ==
 +
If you use 'gettext' and 'translations' units together, don't forget to specify unit when using TranslateUnitResourceStrings function, because it defined in both, and only God knows which one your compiler will choose.
 +
Wrong:
 +
TranslateUnitResourceStrings('LCLStrConsts', PODirectory + 'lclstrconsts.%s.po', Lang, FallbackLang);
 +
Correct:
 +
Translations.TranslateUnitResourceStrings('LCLStrConsts', PODirectory + 'lclstrconsts.%s.po', Lang, FallbackLang);

Latest revision as of 19:08, 12 May 2013

Resource format

The article discusses including .lrs/Lazarus resources. Can you also use .rc/regular Windows resources? These are a bit smaller than Laz resources...

--BigChimp 16:30, 27 February 2013 (UTC)

TranslateUnitResourceStrings defined in two modules

If you use 'gettext' and 'translations' units together, don't forget to specify unit when using TranslateUnitResourceStrings function, because it defined in both, and only God knows which one your compiler will choose. Wrong: TranslateUnitResourceStrings('LCLStrConsts', PODirectory + 'lclstrconsts.%s.po', Lang, FallbackLang); Correct: Translations.TranslateUnitResourceStrings('LCLStrConsts', PODirectory + 'lclstrconsts.%s.po', Lang, FallbackLang);