On Wed, 06 May 2009, Szak�ts Viktor wrote:
Hi,
> Can it be a solution to reserve a certain namespace which can be freely used
> for such user-defined gettext functions?
> Like: hb_i18n_gettext[_strict|_noop]*() ?
> Where '*' can be any valid postfix (with length > 0).
> These function names would be handled similarly to
> hb_i18n_gettext[_strict|_noop](), but would not be defined by
> Harbour itself, they'd be left for the user programs.
> Any opinions?
If you want to use your own i18n functions then you can always
divide compilation and generation of .pot file.
For compilation use some:
#xtranslate hb_i18n_gettext( <x,...> ) => my_i18n_gettext( <x> )
For generating .pot files does not use above PP rules and use -s
compiler switch.
About runtime I18N module switching. Here is the note I left in the
ChangeLog:
2008-12-11 19:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ added i18n module. Now only for internal Harbour usage without support
for optional switching to alternative implementations.
I'll add such functionality later when I will work on native gettext
support.
I plan to add method which allow to register some basic functions at C level
used by HVM and HB_I18N_GETTEXT[_strict|_noop]() so user can create his
own independent I18N implementation. If internal representation of
translation tables in alternative i18n implementation is not compatible
with Harbour one then it cannot use other Harbour HB_I18N_ functions
and has to provide own set of functions giving necessary functionality.
I plan to add real gettext wrapper to Harbour using alternative i18n
implementation.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour