Problem: The client added the Arabic language to their site using WPML and expected the content to display in RTL (right-to-left) format. However, the Arabic content was displaying in left-to-right format due to the use of a custom language code (ar-eg), which WPML did not recognize as RTL. Solution: We advised the client that the issue is controlled by the theme rather than WPML itself. For immediate testing, the client could switch to a theme that supports RTL or set Arabic as the WordPress language without WPML to confirm if the issue persists. To address the specific issue with the custom language code, we provided a code snippet to force RTL direction:
/**
* Force RTL direction for the custom Arabic‑Egypt (ar‑eg) language.
* Adjust the body/html tag direction when WPML's current language is ar-eg.
*/
add_filter( 'language_attributes', function ( $output ) {
// Get WPML's current language code
$current_lang = apply_filters( 'wpml_current_language', null );
// If we're on ar-eg and dir="rtl" is not already in the attributes, add it
if ( 'ar-eg' === $current_lang && false === stripos( $output, 'dir=' ) ) {
// Remove any existing dir attribute just in case, then append rtl
$output = preg_replace( '/\sdir=("|\")(rtl|ltr)\1/i', '', $output );
$output .= ' dir="rtl"';
}
return $output;
}, 20 );
We recommended that the client ensure they have a backup before implementing this snippet as it was not tested directly.
If this solution does not resolve your issue, or if it seems outdated or irrelevant 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 further assistance is needed, please open a new support ticket at WPML support forum.
The client is trying to organize translated pages in the CMS, separating English pages from other languages to make management easier. They also encountered an issue where random pages appeared in the English translation tab and needed to prevent Authors from publishing translations without Admin approval.
If these solutions do not resolve your issue or seem 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 the problem persists, please open a new support ticket at WPML support forum.
Problem: You want to translate the Contact form built with the DIVI Engine Form builder, but the placeholder in the form is not translated correctly. The translation appears in the Advanced Custom Fields (ACE) but not on the Front Page. Solution: We recommend adding the following XML configuration to your WPML settings to ensure that the placeholders and other form fields are correctly translated:
This configuration should help WPML recognize and translate the placeholders and other text fields within your DIVI Engine forms. If this solution does not resolve your issue or seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If necessary, do not hesitate to open a new support ticket.
Problem: The client is developing a custom plugin for a referral and commission system, which shows an error upon activation, suspecting a conflict with WPML. The client also inquired about the necessity of various WPML plugins listed in their setup. Solution: The error is not specifically related to WPML but to the early loading of translation files by plugins like ld-multilingual, learndash-certificate-builder, and learndash-memberpress. These plugins are loading translation files before WordPress is fully initialized, which can cause PHP notices and affect content translation and functionality. We recommend wrapping the translation file loading within an
Replace 'my-plugin-slug' with the actual text domain of your plugin and ensure the .mo/.po files are located in the /languages subdirectory.
If this solution does not resolve the issue or seems irrelevant due to updates or different circumstances, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket if the problem persists. For further assistance, visit our support forum at WPML support forum.
Problem: Sie arbeiten an einer Website in Entwicklung und verwenden WPML, um englische Duplikate von deutschen CPTs per Code zu erstellen. Sie nutzen verschiedene Hooks für Übersetzungen und Synchronisationen, aber nicht alle automatisch übersetzten Posts werden in den englischen Taxonomien angezeigt. Solution: Wir bieten leider keinen Support für individuelle Code-Lösungen, sondern nur für die Standardfunktionen von WPML. Wir empfehlen Ihnen, unsere Dokumentation zu den WPML-Hooks zu konsultieren, die Ihnen bei der Analyse und dem Debugging Ihrer Seite helfen kann. Besuchen Sie WPML Hooks Referenz für weitere Informationen.
Falls diese Lösung für Sie nicht relevant ist, weil sie veraltet ist oder nicht auf Ihren Fall zutrifft, empfehlen wir Ihnen, ein neues Support-Ticket zu eröffnen. Wir empfehlen auch, die Seite mit bekannten Problemen (bekannte Probleme) zu überprüfen, die Version der dauerhaften Lösung zu verifizieren und zu bestätigen, dass Sie die neuesten Versionen von Themes und Plugins installiert haben.
Problem: The client needs to add German translations for over 1,000 existing product categories on their multilingual website, which are already translated into four languages. They attempted to import the German categories as translations of the Latvian terms using WP All Import, but the translations were not linked correctly. Solution: We recommend following the specific workflow outlined in our guide for importing multilingual content. Ensure that you use the WPML Export and Import add-on and adhere to the process described to correctly link the imported categories to the existing translations. You can find the guide here: Importing Multilingual Content. If this method does not resolve the issue, another approach involves exporting all language data, ensuring the CSV file aligns with our documentation, and then re-importing each language. This should allow WPML to correctly connect the default language and its translations. Alternatively, for manual assignment of a large number of categories, consider developing a custom code solution. Use our hook wpml_set_element_language_details to connect the German categories as translations of the default language.
If these solutions do not apply to your case, or if they seem 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. Should you need further assistance, please do not hesitate to open a new support ticket at WPML Support Forum.
Problem: The client wants to replicate the WPML Website Language Switcher styling and behavior on their website, specifically addressing the issue of excessive space on the right of the flags in the language switcher. Solution: We recommended the client to apply custom CSS to adjust the styling of the language switcher. Here are the steps and the code provided:
If this solution does not resolve your issue or 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.
Problem: You have built a custom plugin for WooCommerce and added extra fields like 'Pieces per box', 'Enable custom calculation', 'Piece Height (cm)', and 'Piece Width (cm)'. You want these fields to remain consistent across all languages and be locked with a message indicating that WPML will copy its value from the original language. However, you are unable to lock these custom fields for all languages. Solution: To lock custom fields in WooCommerce to ensure they remain the same across all languages, you can use the
wcml_js_lock_fields_classes
filter. This filter allows you to specify which custom field classes should be locked in the WooCommerce native product editor for translated products. You need to add this code to the functions.php file of your theme or within your custom plugin.
/**
* Add this code to the functions.php file of your theme.
*/
add_filter( 'wcml_js_lock_fields_classes', 'add_js_lock_fields_classes' );
function add_js_lock_fields_classes( $classes ){
// Add 2 locked field classes
$classes[] = '_per_product_pricing_bto';
$classes[] = '_per_product_shipping_bto';
return $classes;
}
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.
Problème : Vous souhaitez traduire des liens intégrés dans les Attributs personnalisés d'Elementor sur votre page d'accueil, mais vous ne parvenez pas à les traduire avec WPML. Solution : Nous avons identifié un code dans votre fichier
functions.php
qui gère les attributs
link|...
ajoutés aux colonnes Elementor. Pour résoudre ce problème, remplacez
home_url()
par le filtre WPML pour générer une URL adaptée à la langue :
Pour plus d'informations sur ce filtre, consultez https://wpml.org/wpml-hook/wpml_home_url/ Si vous avez besoin de compatibilité avec l'éditeur de traduction avancée de WPML, envisagez de déplacer les liens dans un champ texte ou widget standard d’Elementor et de les enregistrer via la configuration XML de WPML. Si ces solutions ne fonctionnent pas, vous pouvez envisager d'utiliser un plugin comme https://wordpress.org/plugins/make-column-clickable-elementor/ ou de contacter un prestataire WPML pour une aide personnalisée : https://wpml.org/contractors/
Si cette solution ne vous semble pas pertinente ou si elle est obsolète, nous vous recommandons de vérifier les problèmes connus sur https://wpml.org/known-issues/, de vérifier la version du correctif permanent et de confirmer que vous avez installé les dernières versions des thèmes et plugins. Si le problème persiste, n'hésitez pas à ouvrir un nouveau ticket de support sur notre forum de support.
The client is experiencing display issues on their website when translating pages into Kurdish and Urdu using WPML. These languages, which use right-to-left (RTL) scripts, show the pages as scrambled and mostly white.
Solution:
We recommend verifying if the theme used on the site fully supports RTL languages. This involves more than just text direction; it also includes layout adjustments, icons, and animations. Here are the steps to diagnose and potentially resolve the issue:
1. Ensure you have a full site backup before making changes. 2. Add another RTL language, such as Arabic or Hebrew, to see if similar display issues occur. 3. Temporarily switch to a default WordPress theme like Twenty Twenty-Four or Twenty Twenty-Five to check if the problem persists.
For more detailed guidance, please refer to our documentation on RTL support:
If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your specific 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 problems persist, please open a new support ticket.
Problem: You are trying to create translations for the Dutch language, but some pages aren't connected to the correct main translation page. Solution: We recommend manually linking already translated pages using the WPML UI. You can follow the step-by-step guide here: https://wpml.org/faq/how-to-link-already-translated-pages/ If you are considering creating a custom query, it might be useful to understand how WPML stores language data in the database. You can find more information here: https://wpml.org/documentation/support/wpml-tables/ However, we strongly advise against direct modifications to the database unless absolutely necessary, as this can lead to unexpected issues.
If this solution does not apply to your case, or if it seems outdated, please do not hesitate to open a new support ticket. We also 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.
Problem: You are trying to allocate products in categories, but they disappeared in the wp-admin categories screen. Although the search results counter shows a number greater than zero, no categories appear in the list.
Solution:
The problem was caused by a custom function in the theme files. Removing that function fixed it!
Please note that 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 the problem persists, please open a new support ticket.