P
P
PendalF892020-08-15 19:41:03
Yii
PendalF89, 2020-08-15 19:41:03

How to localize yii2 using po files?

I want to localize a project on Yii2, using .po-files for storing messages for further editing them in PoEdit. Faced the following difficulties:

  1. How to generate a .po file with plurals? Yii only generates msgstr, but I need msgstr[1], msgstr[2], etc.
  2. What about sentences with multiple plurals? For example: "2 cats and 1 dog participated in the race." The PoEdit interface assumes that only 1 plural number will be used in the sentence


Or skip PoEdit and use the ICU sentence format like 'This is {n, plural, one{item} other{items}}.'? But how then to explain to third-party translators how to work with this format?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question