Support » Fixing WordPress » Archive page localisation

  • I’m working on localising the Arthemia 2.0 Free theme (see also the other problem I ran into here).

    The files are now nicely wrapped in __, _e and __ngettext tags, all of the site is translated (with PoEdit) and shows up just fine in both English and Polish. However, there’s one problem I can’t solve, namely with this string:
    <?php single_cat_title(); ?>

    In full it looks like this in the theme:
    <?php /* If this is a category archive */ if (is_category()) { ?><h2 class="title">Articles in the <?php single_cat_title(); ?> Category</h2>

    I tried various ways of localising it, I was the most successful with printf function:
    <?php /* If this is a category archive */ if (is_category()) { ?><h2 class="title"><?php printf(__('Articles in the %s category', 'arthemia'), single_cat_title(); ?></h2>

    However, this results in the string being returned as “variaArticles in the category” (with Varia being the cat name), while it should be returned as “Articles in the category varia”. Any idea how to get it right?

  • The topic ‘Archive page localisation’ is closed to new replies.