Thanks WP, I did try both combinations, no difference.
I have been browsing through LCLTranslator and its pretty weird !
Firstly, we have -
for i := 1 to Paramcount - 1 do begin
So, if the --lang=es is only parameter, we don't do the subsequent test.
Next, if instead use we use a space rather than an '=', --lang es we do pick it up.
It then calls the helper, GetLocaleFileName(Lang, LCExt, Dir); that tries almost every possible combination of short and long locale codes and directory structure.
About the only combination it does not try is the one documented in the wiki, that is ./locale/project1.es.moNow, I am happy to update the wiki but am not really sure if that is the correct thing to do. I don't for the life of me understand why we have to use the space between long switch and its parameter, but thats clearly what the code wants.
--lang es // works but is inconsistent with normal lazarus model
--lang=es // does not work, but, I believe should.
-les // does not work
-l es // does work
So, rather than fixing the docs, should I fix the code ? Are there people depending on existing model ?
There are two separate issues going on here, the formt of the switch AND the location of the mo file.
Davo
(sorry for edit, accidental early post ...)
(Another edit : it does in fact find ./locale/project1.es.mo but only if it has not found project1.po first. If it finds that, and thats likely to be your primary language one, in my case, English, it uses it. So, it appears to not have changed. So, important, don't keep po files in ./locale I think searching for ./locale/project1.po is a mistake, I cannot imagine why someone would want that ? )