Hallo Fred,

vous ecrit au Sat, 29 Oct 2022 11:48:53 +0000:

> Sadly I did not make it work.
> 
> I did a copy of folder /podemo_mo4stock/lang into new hidden
> folder /home/fred/.msetools/. There is now /home/fred/.msetools/lang
> with all the podemo_xx.mo and podemo_xx.po files.

Yes. No, not so. Didn't I tell you to copy the contents of the
directory "/home_user/.msetools/lang" there? ALL of these files have
names of the pattern "msegui_<lang>.?o" (? in [m, p]), NOT
"podemo_<something>.*". These are the files containing the central
component of the translation system, (hopefully) ALL of the text items
provided by the msegui libray lang_consts units. They're kept there in
a CENTRAL place to avoid multiple redundant and possibly inconsistent
duplicates.
The latter ones are the APPLICATION SPECIFIC residual language files,
and they DO go with the application into a local "lang" subdirectory
indeed. And if you inspect these files, you will find they only contain
a really small subset of the captions used in the program. (I kept the
".po" files in both parts for easy inspection.)

And that's the purpose of the "trick": NOT to have to repeat ALL the
text items used in an appliction over and over again, but to SEPARATE
them from the "stock" items, which reside in a specific location just
as ONE SINGLE COPY for all the applications using them.

> But at running, only English is loaded.

After you put all of the "msegui_<lang>.mo" files into
"/home/fred/.msetools/lang", you should get ALL languages selectable,
and provided you put the file "lang/podemo*" into the "lang"
subdirectory below of where the demo program ("podemo") resides, even
the special items ought to be translated, even
"This is a test of internationalization.", "That is another test."
and "This is the end."
And there's even a switch to allow you to always use the stock items,
even when some of them have been redefined (by accident) in the
application files. It's called "preferStock", default value "false",
and has to be set just before calling the "createnewlang" procedure.
It's not used for the demo, though.
(Also not used for the demo is a quirky conditional define called
"stocklangs_from_libpath" that changes the place for the stock item
subdirectory to the system wide msegui library directory,
"/usr/lib[64]/msegui/lib/common/lang_consts/lang" as an alternative
place. It's meant for discussion whether such a storage place might
be advisable, as a mere user installation probabely would not have
this place at all.)

> May I ask you why not use the /lang folder that is
> in /podemo_mo4stock/lang (lang folder in the same directory as the
> binary-application) ? For testing, it would be much more
> out-of-the-box.

For that, I have to respond: It's in a CENTRAL place because it is
meant to CENTRALIZE often used items to avoid multiple - and then also
possibly inconsistent - versions of these items. Just as dynamic link
libraries do for application programs.

> Also it would be easier to test it in Windows.

Even Windows ought to have a method to put such "library" type things
in a - possibly even user specific - centralized place. In the olden
times, there was the "\Windows" directory, where many programs put
their specific, but application independent, data, sometimes within
special subdirectories, sometimes in subdirectories provided by the
system, and sometimes even directly. I just don't know what the current
practice is under windows and how this could be done there.

I hope you will get it to work with the above information.
You probabely selected the most involved - and likely the most
unfinished - part of all the stuff on my msegui site. But maybe that's
not to bad, since it shows what has to be done to make it easily usable
and what information is neccessary for the prospective user.

Thank you for your interest and the time spent for evaluatiuon, and
I wish you success to get it to work. I hope you can appreciate the
stuff, and perhaps you can make use of it.

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------



_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to