[xliff-tools] XLIFF representation
Asgeir Frimannsson
asgeirf at redhat.com
Wed Apr 27 03:03:39 PDT 2005
Hi Reinout,
On Wed, 27 Apr 2005 18:52, Reinout van Schouwen wrote:
> On Wed, 27 Apr 2005, Asgeir Frimannsson wrote:
> > 3) Developers are locked in to using American English (or at least a
> > Germanic language - as Gettext natively only supports Germanic plural
> > forms).
>
> Are you sure this is correct? Many GNOME modules, for instance, contain
> plural form msgid's where you can indicate in the header how many plural
> forms exist for a target language, and for what number of 'items' which
> plural is meant.
As far as I know, the gettext library does not support writing software where
source language strings have non-Germanic plural forms.
In current Gettext implementation we use:
(In source code:)
ngettext("singular-source", "plural-source", number)
(And then in the PO file:)
msgid "singular-source"
msgid_plural "plural-source"
msgstr[0] "translated-form-0"
msgstr[1] "translated-form-1"
...
msgstr[n] "translated-form-n"
To support any source language, you would need to have something like:
/* specify plurals for the source language, similar to po header field*/
specify_plurals(nplurals, plural_expression);
ngettext("source-form-0", "source-form-1", "source-form-n", number)
(And in the PO file:)
msgid[0] "source-form-0"
msgid[1] "source-form-1"
...
msgid[n] "source-form-n"
msgstr[0] "translated-form-0"
msgstr[1] "translated-form-1"
...
msgstr[n] "translated-form-n"
...But I guess this would complicate things a bit more :) ... As Yves
mentioned, it would be better to use ID based resources if we were to accept
non-English developed applications in large projects like Gnome/KDE/GNU - as
in that way developers can work with the language that's more convenient for
them.
cheers,
asgeir
More information about the xliff-tools
mailing list