[resolved] Cart translation show Items->Položky->Items (6 posts)

  1. mkalinska
    Posted 2 years ago #

    WP 3.6
    Woocommerce v 2.0.14
    theme : Mystile
    plugin Woo Cart Tab: 0.2.1

    In Top menu (at present hidden) and in plugin Cart - Tab(on right side) the translation of word Item is not shown in right language (cs_CZ)

    There is shop with products:

    Try it and you'll see like in one second the word "Item" is changed in front of Your eyes to "Položka" and then into "Item".

    I'v checked translation and plural form of cs_CZ files in:

    Thanks for any ideas.


  2. mkalinska
    Posted 2 years ago #


    just happend with Mystile theme.

    When Wootique or Artificer theme used, the word ITEM is translated to POLOŽKY (of course first the cs_CZ file has to be created).

  3. mkalinska
    Posted 2 years ago #

    Mistake found in code of theme Mystile.

    file: theme-woocommerce.php (includes folder)
    row: 367

    wrong code:
    echo '<span class="contents">' . sprintf(_n('%d item', '%d items', $woocommerce->cart->get_cart_contents_count(), 'woothemes'),

    right code:
    echo '<span class="contents">' . sprintf(_n('%d item &ndash; ', '%d items &ndash; ', $woocommerce->cart->get_cart_contents_count(), 'woothemes'),

  4. Kanye_East
    Posted 2 years ago #

    I'm not sure how adding a dash can fix the issue, if you can explain please do.

    After some further googling I came across some information to quickly patch this up. Here's a working example for that same line 367:

    echo '<span class="contents">' . __( sprintf(_n('%d [:en]item[:fr]article', '%d [:en]items[:fr]articles', $woocommerce->cart->get_cart_contents_count(), 'woothemes'), $woocommerce->cart->get_cart_contents_count())) . '</span>';

    Long and short of it: qTranslate's ‘Quicktags’ work so long as they're enclosed in WP’s translate function ‘__()’, for .php files.

  5. mkalinska
    Posted 2 years ago #


    Your solution will not work for all languages and does not respect translation philosophy.

    If you just add dash .po file for your language translate it right. Before that, you ended with untraslated (english) word.

  6. Kanye_East
    Posted 2 years ago #

    Can you explain further? I've been ad hocing my way through this terribly because .po .mo translations didn't take effect with mystile.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic