Project

General

Profile

multiple <messages nplurals="2" plural="n==1 ? 1 : 0"> definitions within one ResourceBundle?

Added by Christian Meyer over 1 year ago

Just looking for confirmation that it is not expected to have multiple <messages> tags within one file

working on somthing that may need different mappings for plural so it would be nice to keep it within one file

<messages nplurals="2"
        plural="n==1 ? 1 : 0">
</messages>
<messages nplurals="2"
        plural="n==0 ? 0 : 1">
</messages>

Thank you!


Replies (1)

RE: multiple <messages nplurals="2" plural="n==1 ? 1 : 0"> definitions within one ResourceBundle? - Added by Matthias Van Ceulebroeck over 1 year ago

Hi Christian,

That is correct, the parser only expects a single <messages> XML element to exist.
If you want to use multiple plural cases, you will have to divide the messages in different files (and then give the <message> elements different id's lest the override each other).

    (1-1/1)