Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 28 replies, has 2 voices.

Last updated by Andrey 10 months, 1 week ago.

Assisted by: Andrey.

Author Posts
August 22, 2024 at 5:41 pm #16096201

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I have taken a deeper look.

Upon further investigation, I found that the strings "Start Shopping" and "(x item(s))" are not part of Kadence but are related to your custom child theme. Unfortunately, it's not possible to register and translate these strings using the WPML interface and settings. You or the creator of the child theme will need to make these strings translatable.

The available WPML hooks can be found here: https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

The "Review Cart" string is from the Kadence theme, and I have translated it. I have also attached screenshots for your reference.

Torulumetõke-trapetsprofiilile-3m-komplekt-–-Olly-Terasprofiilid.png
String-Translation-‹-Olly-Terasprofiilid-—-WordPress.png
August 23, 2024 at 4:42 pm #16099223

karelR-3

Hey,

I don't think so. I checked the original Kadence theme with the mini-cart block, and the issue persists there. Attached the image from the block.

Screenshot 2024-08-23 at 18.40.49.png
August 23, 2024 at 4:45 pm #16099243

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback. I couldn't see these strings in the mini cart with the Kadence theme. Can you activate the parent theme and set them up to display?

August 23, 2024 at 5:00 pm #16099277

karelR-3

Found the place it is coming from. It is from Woocommerce itself: hidden link

August 23, 2024 at 5:05 pm #16099283

karelR-3

And the %n items counter comes from here: hidden link

August 23, 2024 at 5:08 pm #16099288

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

How do you display them in your mini cart in a child theme? Can you do this for the parent theme?

August 23, 2024 at 5:10 pm #16099289

karelR-3

It is displayed via the widget that uses Woocommerce Mini-Cart block that I showed below. I don't want to switch to the parent theme since I have all the custom functions there that might ruin the setup. I already found the sources for those strings for you above, so there is no question it is coming directly from Woocommerce blocks.

August 23, 2024 at 5:16 pm #16099293

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

It looks to have a specific way of being displayed with your child's theme. We need to make sure that it also persists with the commercial theme. Is it possible to set up a staging site where we can do further tests?

August 23, 2024 at 5:37 pm #16099328

karelR-3

Completely new installation from scratch. hidden link. Send the private form for login details.

August 23, 2024 at 6:38 pm #16099473

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you a lot. The following reply is private.

August 27, 2024 at 1:56 pm #16110400

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

The issue has been reported to our team. I will update you once I have more news.

August 28, 2024 at 3:20 pm #16115988

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

We have a temporary workaround for you. The issue will be addressed in future releases.

Create a file: "woocommerce-et-03d59a391e3fa87860de5bc40e402251.json" and place it in wp-content/languages/plugins/ folder.
The contents should consist of the translated values (for example, "test 1" and "test many").

{
  "translation-revision-date": "2024-08-27 09:24:30+0000",
  "generator": "GlotPress\/4.0.1",
  "domain": "messages",
  "locale_data": {
    "messages": {
      "": {
        "domain": "messages",
        "plural-forms": "nplurals=2; plural=n > 1;",
        "lang": "et"
      },
      "(%d item)": [
        "(%d test 1)",
        "(%d test many)"
      ]
    }
  },
  "comment": {
    "reference": "assets\/client\/blocks\/mini-cart-contents-block\/title-style.js"
  }
}

Save the file. This should be sufficient for the value to be translated.

Same with the "Start shopping", but in the file: wp-content/languages/plugins/woocommerce-et-98a8fb20e4e5f75bcfb26995589650e8.json

Here is the sample for French:

<{
  "translation-revision-date": "2024-08-27 09:24:30+0000",
  "generator": "GlotPress\/4.0.1",
  "domain": "messages",
  "locale_data": {
    "messages": {
      "": {
        "domain": "messages",
        "plural-forms": "nplurals=2; plural=n > 1;",
        "lang": "fr"
      },
      "(%d item)": [
        "(%d article)",
        "(%d articles)"
      ],
      "Flat rate shipping": [
        "Livraison forfaitaire"
      ],
      "Remove %s from cart": [
        "Retirer %s du panier"
      ],
      "Increase quantity of %s": [
        "Augmenter la quantit\u00e9 de %s"
      ],
      "Reduce quantity of %s": [
        "R\u00e9duire la quantit\u00e9 de %s"
      ],
      "T-Shirt": [
        "T-Shirt"
      ],
      "Hoodie with Pocket": [
        "Sweat \u00e0 capuche avec poche"
      ],
      "Hoodie with Logo": [
        "Sweat \u00e0 capuche avec logo"
      ],
      "Hoodie with Zipper": [
        "Sweat \u00e0 capuche avec fermeture \u00e0 glissi\u00e8re"
      ],
      "Long Sleeve Tee": [
        "T-shirt \u00e0 manches longues"
      ],
      "Polo": [
        "Polo"
      ],
      "Start shopping": [
        "Commencer les achats"
      ],
      "Empty Mini-Cart": [
        "Mini panier vide"
      ],
      "Filled Mini-Cart": [
        "Mini panier rempli"
      ],
      "Mini-Cart Contents": [
        "Contenu du mini panier"
      ],
      "View my cart": [
        "Voir mon panier"
      ],
      "Shipping, taxes, and discounts calculated at checkout.": [
        "Les frais d\u2019exp\u00e9dition, les taxes et les remises sont calcul\u00e9s lors de la validation de commande."
      ],
      "Go to checkout": [
        "Valider la commande"
      ],
      "Your cart": [
        "Votre panier"
      ],
      "%s has been removed from your cart.": [
        "%s a \u00e9t\u00e9 supprim\u00e9 de votre panier."
      ],
      "Display a Mini-Cart widget.": [
        "Affiche un widget de mini panier."
      ],
      "Price between %1$s and %2$s": [
        "Prix compris entre %1$s et %2$s"
      ],
      "%s (optional)": [
        "%s (facultatif)"
      ],
      "Details": [
        "D\u00e9tails"
      ],
      "Remove item": [
        "Supprimer l\u2019\u00e9l\u00e9ment"
      ],
      "Orange": [
        "Orange"
      ],
      "Lightweight baseball cap": [
        "Casquette l\u00e9g\u00e8re de baseball"
      ],
      "Cap": [
        "Casquette"
      ],
      "Yellow": [
        "Jaune"
      ],
      "Beanie": [
        "Bonnet"
      ],
      "example product in Cart Block\u0004Beanie": [
        "Bonnet"
      ],
      "example product in Cart Block\u0004Beanie with Logo": [
        "Bonnet avec logo"
      ],
      "Quantity increased to %s.": [
        "Quantit\u00e9 augment\u00e9e \u00e0 %s."
      ],
      "Quantity reduced to %s.": [
        "Quantit\u00e9 r\u00e9duite \u00e0 %s."
      ],
      "Quantity of %s in your cart.": [
        "Quantit\u00e9 de %s dans votre panier."
      ],
      "Warm hat for winter": [
        "Bonnet chaud pour l\u2019hiver"
      ],
      "%d left in stock": [
        "%d en stock"
      ],
      "Discounted price:": [
        "Prix r\u00e9duit\u00a0:"
      ],
      "Previous price:": [
        "Prix pr\u00e9c\u00e9dent\u00a0:"
      ],
      "Sales tax": [
        "TVA"
      ],
      "Color": [
        "Couleur"
      ],
      "Small": [
        "Petit"
      ],
      "Size": [
        "Taille"
      ],
      "Free shipping": [
        "Livraison gratuite"
      ],
      "Subtotal": [
        "Sous-total"
      ],
      "Dimensions": [
        "Dimensions"
      ],
      "Shipping": [
        "Exp\u00e9dition"
      ],
      "Save %s": [
        "\u00c9conomisez %s"
      ],
      "Total": [
        "Total"
      ],
      "WooCommerce": [
        "WooCommerce"
      ],
      "Product": [
        "Produit"
      ],
      "Fee": [
        "Frais"
      ],
      "Available on backorder": [
        "Disponible sur commande"
      ],
      "Local pickup": [
        "Point de vente"
      ]
    }
  },
  "comment": {
    "reference": "assets\/client\/blocks\/mini-cart-contents.js"
  }
}

Please remember to backup your database before you proceed.

August 30, 2024 at 12:51 pm #16124817

karelR-3

The second one is still unresolved. The file already exists so I just added this string but doesn't still appear to be translated. File contents:

{"translation-revision-date":"2024-08-17 13:48:20+0000","generator":"GlotPress\/4.0.1","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"et_EE"},"Shipping, taxes, and discounts calculated at checkout.":["Tarne, maksud ja soodustused arvutatakse kassas."],"View my cart":["Vaata ostukorvi"],"Go to checkout":["Mine kassasse"],"Your cart":["Sinu ostukorv"],"Details":["Detailid"],"Orange":["Oran\u017e"],"Yellow":["Kollane"],"Quantity of %s in your cart.":["%s kogus sinu ostukorvis. "],"Quantity reduced to %s.":["Kogus v\u00e4hendatud %s-ni."],"Quantity increased to %s.":["Kogus suurendatud %s-ni."],"Remove item":["Eemalda"],"Previous price:":["Eelmine hind:"],"Free shipping":["Tasuta transport"],"Subtotal":["Vahesumma"],"Dimensions":["M\u00f5\u00f5tmed"],"Save %s":["Salvesta %s"],"Shipping":["Tarne"],"Total":["Kokku"],"WooCommerce":["WooCommerce"],"Product":["Toode"],"Fee":["Tasu"],"Available on backorder":["Saadaval j\u00e4reltellimisel"],"Local pickup":["Tulen ise j\u00e4rgi"], "Start shopping": [
"Alusta ostlemist"
]}},"comment":{"reference":"assets\/client\/blocks\/mini-cart-contents.js"}}

September 2, 2024 at 2:00 pm #16132135

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

I have done it another way: I temporarily installed the Loco Translate plugin on your staging site. I found the string, translated it, and synced it. So, the plugin has updated and synced a few files. We seem to have not updated all translation files.

image2.png
image.png