Hi,
 
For gettext plural forms problem boils down to definition of Plural-Forms directives in .po files and putting in translation strings, e.g. msgstr[2] "third form"
Сalling ngettext() then should work as expected.
 
On the subject of client side translation, I dare to propose that the bulk translation should be applied classically server side as that mitigates browser support problems and requires none of that `data-l10n-id` markup stuff.
 
 
27.01.2016, 02:47, "Donald Stufft" <don...@stufft.io>:

 

Hey, thanks! That’s great information, and I bet that’s why L20n.js (what we’re currently using.. but it’s client side so we need to decide if that’s OK and if it is if the browser support is OK) lets you sort of program your translations a bit.

An example from the L20n website is here http://l20n.org/learn/putting-it-all-together-complex-plurals-example/

I’m not sure how to tell if Python’s gettext supports that. The documentation says "If a translation is found, apply the plural formula to n, and return the resulting message (some languages have more than two plural forms).” which sounds like it might work like that? I found https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html which goes way over my head but it mentions Slavic languages so that seems promising?

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
 

,

_______________________________________________
PSF-Community mailing list
PSF-Community@python.org
https://mail.python.org/mailman/listinfo/psf-community

 
 
--
Igor Starikov
_______________________________________________
PSF-Community mailing list
PSF-Community@python.org
https://mail.python.org/mailman/listinfo/psf-community

Reply via email to