Hello Sieghard.

A fast answer to your post...

> And declaring the array as a constant makes it impossible to change the
> number and kind of languages supported later on without recompilation.

At the moment, without recompilation, if you add new mo/po file in /lang 
directory, in the languages list of /menu/settings/lang, the new language will 
appear at end of list with only, as name,  'Language" and the lang-code.
(It is how "createnewlang()" works in my po2array.pas.)
By the way, in ideU source, your "po2array.pas" was renamed "mo2array.pas", I 
did not check how you do if the number of mo files are > than the length of 
language array.)

I agree it is not ideal, maybe the name of the language should be strored into 
the po/mo file into a comment and use that as language-name.
But, indeed, for all the other languages, only the English name will appear (or 
need to add the translated name of new language for each language.)
Yes, there is something to think there.

Anyway, answer to your previous post will follow asap.

Thanks Sieghard.

Fre;D

________________________________
De : Sieghard via mseide-msegui-talk <mseide-msegui-talk@lists.sourceforge.net>
Envoyé : lundi 7 mars 2022 22:53
À : mseide-msegui-talk@lists.sourceforge.net 
<mseide-msegui-talk@lists.sourceforge.net>
Cc : Sieghard <s_c_...@arcor.de>
Objet : Re: [MSEide-MSEgui-talk] UTF things?msegui_dymsegui_dynpo-mod.zip │ 
108404│03. Mär 19:10npo-mod.zip │ 108404│03. Mär 19:10

Hallo Fred van Stappen,

vous ecrit au Mon, 7 Mar 2022 00:52:48 +0000:

> >I found a real problem with the po4stock unit:
...
> Hum, not really (or I miss something).
> "en_langnamestext", contains  6 entries only if you dont use the
> parameter  " -dmse_dynpo". Those 6 entries correspond to the units
> mseconst_xx.pas that will be used if you use the old "static loading
> of lang-units" way.

Yes, indeed, that's how it's set up. And now that I recompiled and
rechecked ideU using an application unaware (p|m)o4stock unit it DID
indeed compile and run correctly.
Sorry for the upheaval, I seem to have mixed up something, maybe
because I'm keeping several mseide-msegui versions around for older
projects and switch between them if needed.

> See in mseconst.pas, there are some {$ifndef mse_dynpo} to use the

Yes, I realized that, but by some means, the en_langnamestext:array
stubbornly kept a size of "6" and a value of "nil". Only when I had
changed it to a dynamic array (and the one in captionideu.pas too) it
behaved.

> "original" mseconst.pas. For example, in ideU, the lang array is in
> captionideu.pas  (not in mseconst.pas): en_langnamestext:
> array[0..14] of msestring = (

Yes, this requires an application to provide such an array in any case.
And declaring the array as a constant makes it impossible to change the
number and kind of languages supported later on without recompilation.

> Of course you may use a dynamic array :
>    en_langnamestext: array of msestring = (
>  but this will work only for fpc > 3.2.0 so, to keep backward
> compability, I prefer to use a const array.

Really only from 3.2.0 on? The fpc documentation file "ref.pdf" says:
"As of version 3.0 of Free Pascal, Dynamic array types have a
constructor.", and that's the file that says in it's title
"Reference guide for Free Pascal, version 3.0.4", so it must have been
available at least from that far back. But still, that might not mean
from 3.0.0 on already.

> But, once again, maybe I miss something.

Sorry for the wrong complaint, so all seems well in this respect.

> I will study the rest of your post this week.

Thanks for your kind regard.

In the meantime, I will probabely try to let the unit make use of
Linux' general storage method fpr application language files, in case
some maintainer wants - requires - such a set up.
The anguage path definition is already set up in such a way that it
provides your "standard" setting without any further intervention, but
can still be modified by the application through simply assigning the
"new" path to the variable "LangDir".

BTW, as an aside, I did modify the mse file directory on my web site
to make it accessible by a browser for directory display and file
download, but it HAS to be addressed explicitely by giving a full URL,
it is NOT reachable from the main page. My firefox even wanted to
"see" the main page first and then be redirected to the download URL,
but I don't know whether that's a general requirement.

--
(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
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to