Forum > Translations

lazarus "i18n" PO Output Directory setting, Users are easily misled

(1/1)

gasensor:
User can set the PO Output Directory freely in lazarus. However, the PO Output Directory should be "languages","locale" or "locale/LangID/LC_MESSAGES". Otherwise the user program will not display correctly. It is not mentioned anywhere.

Maybe, it is a good idea that change it form TEdit to TRadioButton.

wp:
The directories are hard-coded in the LCLTranslator unit. But you can use the translation system also without LCLTranslator, and in this case you have full control over the location of the po files (https://wiki.lazarus.freepascal.org/Getting_translation_strings_right#ResourceStrings_in_your_Application).

dsiders:

--- Quote from: gasensor on May 17, 2022, 06:46:01 pm ---User can set the PO Output Directory freely in lazarus. However, the PO Output Directory should be "languages","locale" or "locale/LangID/LC_MESSAGES". Otherwise the user program will not display correctly. It is not mentioned anywhere.

Maybe, it is a good idea that change it form TEdit to TRadioButton.

--- End quote ---

The requirement is documented in the LCLTranslator unit:

https://dsiders.gitlab.io/lazdocsnext/lcl/lcltranslator/index.html

But it is not mentioned in the Context Help used in the IDE dialog:

https://wiki.lazarus.freepascal.org/IDE_Window:__Project_Options#i18n

I am not sure who maintains that information on the wiki. Perhaps you could file a bug report for it.

CCRDude:
If you speak about the path, it would fit better into Compiler Options / Paths for me.
I've got a project with multiple build modes, with different target folders for the executables, and possibly different strings per mode (branding).
But then, it could not be easily updated when saving .lfm files...

The way it currently is works fine :)

dbannon:
As CCRDude said, the location set in Lazarus is more about where the files are stored during development and where the build system will look for them.

At run time is a different thing, its pre-determined in the Translator and complies with most operating systems defaults.

https://wiki.freepascal.org/Everything_else_about_translations#Where_a_Lazarus_App_looks_for_Language_Files is linked off the main i18n page, https://wiki.freepascal.org/Translations_/_i18n_/_localizations_for_programs

Davo

Navigation

[0] Message Index

Go to full version