On Mon, 01 Dec 2008, Mindaugas Kavaliauskas wrote:
Hi,
>> In Lithuanian you have also 3 forms:
>> 1. for numbers ending with 10, 11, 12, 13, ..., 19
>> 2. for numbers ending with 1
>> 3. for rest
> I remembered the problem. I wanted to create app with Lithuanian source
> code language, but ngettext() is adopted for english source code.
Yes, it is.
I also think about it. The same problem I have when I want to use
Polish as base language. I'm thinking about adding our own extension
for it, sth like:
hb_gettext( { <cForm1> [, <cFormN>] } [, <cContext>], <nCount> )
or:
hb_ngettext( <nCount>, { <cForm1> [, <cFormN>] } [, <cContext>] )
So it will be possible to use also non English languages as base.
In such case programmer will have to set plural index rule at application
startup. The default one will be: iif( n == 1, 1, 2 )
If there is translation with corresponding plural index but at least one
exists then we can use the 1-st one. In such case it will not be necessary
to repeat the same translations when the translated one has only one form
in given language.
In .pot file we may store base strings as:
msgid "single form"
msgid_plural "plural form 1"
msgid_plural2 "plural form 2"
so as long as someone will use only two forms it will be gettext compatible.
msgid will be still main hash index and msgid_plural* will be used only as
optional results when nCount is given and and index created from nCount has
corresponding msgid_plural* entry.
What do you think about it?
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour