Title: Javascript error on translated product
Last modified: November 26, 2024

---

# Javascript error on translated product

 *  Resolved [studiospot](https://wordpress.org/support/users/studiospot/)
 * (@studiospot)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/javascript-error-on-translated-product/)
 * Hi everyone, I’m having a problem with my translated page. The text is translated
   correctly but unfortunately a javascript error occurs which prevents users from
   selecting products.
 * The page in question is a “Bundle” product page created with the “Easy Product
   Bundles for WooCommerce by
   “Product Bundles Team”
 * To replicate the problem, enter the page, change the language using the widget
   at the bottom of the page, once the page is translated select the products in
   the appropriate section. After selecting 1 or 2 the section disappears.
   How can
   I solve it?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-error-on-translated-product%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [edo888](https://wordpress.org/support/users/edo888/)
 * (@edo888)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/javascript-error-on-translated-product/#post-18162217)
 * Hi,
 * I have checked your website and I see the following code:
 *     ```
       (function(domain, translations) {
               var localeData = translations.locale_data[domain] || translations.locale_data.messages;
               localeData[""].domain = domain;
               wp.i18n.setLocaleData(localeData, domain);
           }
           )("asnp-easy-product-bundles-pro", {
               "translation-revision-date": "YEAR-MO-DA HO:MI+ZONE",
               "generator": "WP-CLI/2.5.0",
               "source": "assets/js/product/index.js",
               "domain": "messages",
               "locale_data": {
                   "messages": {
                       "": {
                           "domain": "messages",
                           "lang": "it_IT",
                           "plural-forms": "nplurals=2; plural=(n != 1);"
                       },
                       "Add": ["aggiungi"],
                       "Add%s": ["aggiungi%s"],
                       "Please select a product!": ["seleziona un prodotto!"],
                       "Bundle item image": ["Immagine dell'articolo del bundle"],
                       "Change": ["modifica"],
                       "View": ["guarda"],
                       "Optional": ["opzionale"],
                       "Delete": ["Elimina"],
                       "Product information": ["Informazioni sul prodotto"],
                       "Total items quantity should be at least %d or more.": ["La quantità totale degli elementi deve essere almeno %d o più."],
                       "Total items quantity should not exceed %d.": ["La quantità totale degli elementi non deve superare %d."]
                   }
               }
           });
       ```
   
 * From what I understood from this file: /logevy/wp-includes/js/dist/vendor/react-
   dom.min.js, it is using that info to update the selected elements. I have not
   reviewed the code in detail, since it is minified and not human readable, it 
   has issues when the text is translated and does not match the defined localization
   data.
 * Unfortunately I do not know a way to easily fix it in the free version other 
   than to suggest to consult the bundle plugin support, where they have the js 
   source codes and can possibly figure out why their code is not happy and modify
   it to account translated content.
 * I believe it can be solved if you switch to our paid version, where we can translate
   the locale_data javascript variables to not cause conflicts. It will need extra
   configuration, so if you decide to sign up, you will need to ask our live chat
   agents to help you: [https://gtranslate.io/#pricing](https://gtranslate.io/#pricing)
 * Thanks! 🙂

Viewing 1 replies (of 1 total)

The topic ‘Javascript error on translated product’ is closed to new replies.

 * ![](https://ps.w.org/google-language-translator/assets/icon-256x256.png?rev=3007649)
 * [Translate WordPress - Google Language Translator](https://wordpress.org/plugins/google-language-translator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-language-translator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-language-translator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-language-translator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-language-translator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-language-translator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [edo888](https://wordpress.org/support/users/edo888/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/javascript-error-on-translated-product/#post-18162217)
 * Status: resolved