How can I combine Catalyst and ngettext?

I am trying to deal with i18n using Catalyst. As I understand it, there are two ways to make translations with Perl: Layout and Gettext . However, I have a requirement to support the gettext .po format , so basically I'm going to get gettext.

Now I have found Catalyst :: Plugin :: I18n and therefore Locale :: Maketext :: Lexicon, which does what I want most of the time. However, it does not generate regular forms of multiplicity, i.e. Correct records and to file .pot . This is probably due to the fact that Maketext depends on its parenthesis and, therefore, must have the same designation in the translation. msgid_plural msgstr[x][quant,_1...]

Another solution would be to use some kind of direct gettext port, such as Locale :: Messages, but that would mean rewriting C :: P :: I18n.

Does anyone have a correct solution to this problem besides rewriting several modules? Anything that combines the proper gettext with all its features and Catalyst will do.

+3
source share
1 answer

You will probably get the best answer on the mailing list:

http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

I assume you also read this:

http://www.catalystframework.org/calendar/2006/18

+2
source

Source: https://habr.com/ru/post/1702448/


All Articles