How do you handle Pluralization?

Posted by Jennifer | Updated on

You can translate with pluralization by defining the locale that have a pipe | separator, and define plurals in pipe separator. Remember that template should use $tc() instead of $t().

First you need to define the messages,

And the template can configure the messages with values

Finally it outputs the result as below


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers