On 06.08.2012 22:22, Marco van de Voort wrote:
In our previous episode, Sven Barth said:
The function returns the right language.

Somehow this sounds like the GNU GetText function _() works. With the
exception that the text which has to be translated is simply searched by
looking through the source code for _("some text")...

Note that one of the problems of this is that it makes your text also the
key that identifies an unique piece of text.

While I use (dx)gettext myself, I still think that is one of the
disadvantages.

P.s. the _() is not necessary with D2009+ anymore

Which reminds me: Delphi uses a different style of resource string system. In FPC you can set up the resourcestrings table based while in Delphi a "LoadResString" function is used each time a resourcestring is accessed. You can override the default functionality by setting a corresponding procedure variable. See also here http://docwiki.embarcadero.com/Libraries/en/System.LoadResString

It wouldn't solve the problem of "declaring a resourcestring" though and also the function doesn't get the "resource string identifier" as the table based function in FPC currently gets... so in that regard the system seems more limited (while it has some positive aspects as well).

Regards,
Sven

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to