Problem: The client has a Google review widget on their website, translated into four languages using different JavaScripts for each language. They face an issue where every time the page is updated, the JavaScripts for other languages revert to the main language, requiring manual adjustments each time. Solution: We recommend not using JavaScript code in the glossary as WPML does not support translating JavaScript natively. Instead, you can use WPML's filters and action hooks to manage multilingual support. Here's how you can proceed: 1. Remove the JavaScript code from the glossary. 2. Write custom code to detect the current language and insert the appropriate JavaScript code. You can find guidance on this through the following documentation links:
If you need professional help to implement this, consider hiring a WPML-certified contractor from this list.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.
Problem: The client needed the Finnish, Latvian, and Lithuanian flags in their WPML language switcher to link to external partner sites instead of internal translations, but the existing jQuery code was not functioning. Solution: We recommended adding a custom function to the
functions.php
file of the client's theme. This function modifies the language switcher to include external links for the specified languages. Here is the code to implement:
Please ensure to back up your site fully before implementing this solution. If this solution does not resolve your issue or seems outdated, we recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.
Problem: The client is working on a site with multiple domains using WPML and WooCommerce for regions like the USA, UK, and Germany. They want to restrict customers from ordering from certain domains based on their shipping address, but the WooCommerce option 'Sell to all countries, except for…' applies globally and does not allow for domain-specific restrictions. Solution: We recommend using custom hooks to achieve domain-specific restrictions. One approach is to use the
woocommerce_checkout_process
hook to check the current domain against the customer's shipping country. If there is a mismatch, display an error and prevent checkout. Alternatively, consider redirecting customers to the correct store based on their location or using third-party plugins like Conditional Shipping and Payments for more flexibility.
It's important to note that restricting EU customers based on their shipping address might violate EU price discrimination laws, particularly under the Geo-blocking Regulation (EU) 2018/302. This regulation prohibits unjustified geo-blocking and discrimination based on nationality, residence, or place of establishment within the EU. Ensure compliance when implementing any restrictions.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
Problema: Nella pagina delle stanze del sito, i contenuti sono duplicati e visualizzati sia in italiano che in inglese. Soluzione: Questo accade perché il tipo di contenuto 'eagle_rooms' non era impostato come traducibile.
Se questa soluzione non risolve il problema o sembra non essere più attuale, ti invitiamo a verificare i problemi noti e a confermare che hai installato le versioni più recenti dei temi e dei plugin. Se necessario, apri un nuovo ticket di supporto.
Problem: The client is developing a site and needs a separate payment gateway for each currency. The gateway is custom coded, and the client wants to make it compatible with WPML's multicurrency feature. Solution: We explained that any payment gateways set up in the Payments section of WooCommerce → Settings will be available for all site’s currencies. If the client wants to use different gateways with different settings for each currency, this is only compatible with a few gateways. For a custom-coded gateway, ensuring compatibility with WPML's multicurrency feature is not straightforward and requires complex compatibility collaboration with our developers. We recommend that if the client's plugin will be publicly available, they should consider joining our Go Global program to collaborate with our compatibility developers.
For more details on setting up payment gateways for each currency, please visit this documentation.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.
Problem: You are trying to set the thousand separator and decimal separator per language in WooCommerce Multilingual & Multicurrency, specifically for displaying prices in Euros with the correct formatting for different countries like Ireland, where the expected format is €1,914.00 instead of the European format €1.914,00. Solution: Currently, there isn't a direct way to adjust these settings through the UI for secondary currencies. However, we can achieve this by using WooCommerce filters. We have added the necessary code as a Code Snippet on your site. Here is the code you can use:
/**
* Force formatting euro prices for the Ireland language
*/
add_filter( 'wc_get_price_thousand_separator', function( $value ) {
$current_language = apply_filters( 'wpml_current_language', null );
if ( $current_language === 'en-ie' ) {
$value = ",";
}
return $value;
}, 11 );
add_filter( 'wc_get_price_decimal_separator', function( $value ) {
$current_language = apply_filters( 'wpml_current_language', null );
if ( $current_language === 'en-ie' ) {
$value = ".";
}
return $value;
}, 11 );
This code will specifically change the thousand and decimal separators for prices when the site’s language is set to Irish English ('en-ie').
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
Problema: El cliente ha configurado la traducción automática en su sitio web con WPML para tres idiomas: castellano, inglés y catalán. Los usuarios pueden crear contenido en cualquiera de estos idiomas a través del FrontEnd, y el cliente necesita que se traduzcan automáticamente sin importar en qué idioma se haya creado. Sin embargo, enfrenta problemas con la traducción automática de ciertos tipos de contenido. Solución: 1. Confirmamos que la traducción automática es posible con WPML y se puede configurar para que traduzca automáticamente todo el contenido del sitio y se publique automáticamente. Esto se puede hacer al instalar WPML o en WPML -> Configuración -> Primera sección. Más detalles en documentación de traducción automática. 2. Se sugirió incrementar el límite de memoria de WordPress a un mínimo de 128Mb. Para ello, se puede agregar el siguiente código al archivo wp-config.php:
3. Se recomendó crear una copia de seguridad del sitio completo y actualizar todos los plugins y temas desactualizados. 4. Para problemas específicos con tipos de contenido que no se traducen automáticamente, como Comunidad o Filmografía, se sugiere la implementación de código personalizado. Se recomienda revisar nuestro listado de hooks en referencia de hooks de WPML y contactar con uno de nuestros partners certificados en WPML contractors.
Si esta solución no resuelve tu problema o si la información proporcionada se ha vuelto obsoleta, te recomendamos abrir un nuevo ticket de soporte. También es aconsejable revisar los problemas conocidos en problemas conocidos de WPML, verificar la versión del arreglo permanente y confirmar que tienes instaladas las últimas versiones de temas y plugins.
Problem: The client is unable to update the translation of the 'Quick Contact' section in the sidebar of their blog page using WPML's String Translation. Despite translating other titles successfully, the specific text 'Mieten Sie jetzt Ihren VIP-Bus mit Fahrer in Berlin für Ihren Service.' remains untranslated. Solution: We recommend the following steps to resolve the issue: 1. Ensure that the 'Look for strings while pages are rendered' option is enabled in WPML's String Translation settings. 2. Visit the problematic page and refresh it to allow WPML to detect all translatable strings. 3. Navigate to the WPML String Translation page and search for the specific string 'Mieten Sie'. 4. Verify and, if necessary, correct the language setting of the widget to German. 5. Translate the widget content to English.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your current setup, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.
Problem: Il cliente desidera sincronizzare i menu in italiano e inglese sul proprio sito, ma incontra difficoltà a causa di problemi legati al tema, che non gestisce correttamente i sottomenu in altre lingue e la sincronizzazione delle pagine. Solution: Se stai riscontrando problemi simili, ti consigliamo di verificare le impostazioni del tema. Tuttavia, il tema utilizzato non è stato testato con WPML, il che potrebbe causare incompatibilità. Ti raccomandiamo di contattare direttamente l'autore del tema per risolvere questi problemi. Inoltre, assicurati di avere i permessi necessari per accedere alle opzioni del tema.
Se questa soluzione non dovesse essere più rilevante, perché potrebbe essere superata o non applicabile al tuo caso, ti suggeriamo di aprire un nuovo ticket di supporto. Ti consigliamo vivamente di consultare la pagina dei problemi noti, verificare la versione della correzione permanente e confermare di avere installato le ultime versioni dei temi e dei plugin. Per ulteriore assistenza, visita il forum di supporto WPML.
Problem: You are developing a site and want the WordPress API to respond in English, despite the main website language being different. You tried using the WPML Hook with
do_action('wpml_switch_language', 'en');
but it did not work. Solution: We recommend using the
rest_request_before_callbacks
filter to force the WPML language for specific API endpoints. Here is an example of how you can implement this:
add_filter('rest_request_before_callbacks', function ($response, $handler, $request) {<br /> // Specify the endpoints you want to target (or apply globally).<br /> $target_endpoints = ['/wp/v2/posts', '/wp/v2/pages'];<br /> <br /> if (in_array($request->get_route(), $target_endpoints, true)) {<br /> // Switch WPML language context to English.<br /> do_action('wpml_switch_language', 'en');<br /> }<br /> <br /> return $response;<br />}, 10, 3);
Please note that we do not provide support for custom coding issues, but only guidance and examples as shown above. If you need further assistance, you might consider hiring a WPML Contractor.
This solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket.
Problem: You are using WPML with WooCommerce and WooCommerce Bookings, and you want all outgoing emails to be delivered only in the default language, English. However, customers are receiving booking and order emails in various languages, such as English, German, or Dutch, even when they order the same product in English. Solution: Currently, there is no straightforward out-of-the-box solution to ensure all outgoing emails are sent only in English, as emails are typically sent in the language in which the order was made or the language set in the user's profile. We recommend translating the emails and setting the default language as English in the translations. Alternatively, you could consider hiring a contractor to implement custom code to achieve this functionality. You can find qualified contractors at https://wpml.org/contractors/.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket at WPML support forum.