• Resolved Abdessamad Idrissi

    (@numediaweb)


    I’m creating a theme where I need to use the plural form in Arabic (has 5 forms); unfortunately the _n function accepts only 2 forms; singular and plural

    $since = sprintf(_n('%s hour', '%s hours', $hours), $hours);

    how can I bypass this limitation since my theme is in Arabic?

    The arabic plural formula is:
    nplurals=6; plural=n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n >= 3 && n <= 10 ? 3 : n >= 11 && n <= 99 ? 4 : 5;

    thanx,

Viewing 1 replies (of 1 total)
  • Thread Starter Abdessamad Idrissi

    (@numediaweb)

    actually it works using the english version of plurals; just write the plural as the plural in english then in po edit it will give you to change the other plural forms.. kind of wiered but it works!

Viewing 1 replies (of 1 total)
  • The topic ‘_n : plurals with more than 2 forms’ is closed to new replies.