Theme localization: _ngettext problem (2 posts)

  1. Halibutt
    Posted 7 years ago #

    Hello everyone. I'm trying hard to make the excellent theme The Morning After localizable, that is to wrap all parts of code into _e and __ tags, translate it with PoEdit and voila.

    Being a .php newbie I managed to fix most problems and the work is almost done. However, there's one thing I cannot set straight. There's this line:
    <?php comments_popup_link('Post a comment', 'One comment', '% comments', '', 'Comments off'); ?>
    A similar is this one:
    <?php comments_number('Post a comment','One comment','% comments'); ?>

    It looks fine in English or German languages, where the rules of forming plural are pretty straightforward, but not in languages like my own. So, I thought I need to wrap those lines in __ngettext, but whichever I go, it doesn't work. Any idea how to wrap those lines of code? Pretty, pretty please? :)

    BTW, the rules for Polish plurals in PoEdit's terms are:
    nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n%10>=2 && n%10<=4 \
    && (n%100<10 || n%100>=20) ? 2 : 3);\n"
    as opposed to English rules nplurals=2; plural=(n != 1) Get the idea?

  2. Halibutt
    Posted 7 years ago #

    Never mind, I fixed that. For the record, the solution is here: http://themasterplan.in/talk/comments.php?DiscussionID=75&page=2#Item_9


Topic Closed

This topic has been closed to new replies.

About this Topic