Problem: You are developing a site using WPML's auto-translate feature and have encountered an issue where links within content translated using the Advanced Custom Fields (ACF) remain in the original language and point to the main language pages. Solution: To resolve this issue, you need to modify your template code to ensure that links are correctly translated and point to the appropriate language versions. Here is a step-by-step guide:
Ensure that your ACF link field is set to 'Translate' to allow for the translation of the link URL and text.
Modify your template code to use the
wpml_permalink
filter for translating the URL, and the
wpml_translate_string
filter for translating the link title. Here is an example of how you can implement this:
Adjust the return value of the link field to 'Link URL' to ensure the correct data type is used for URLs.
Please note that this solution might be outdated or not applicable to your specific case. If this solution does not resolve your issue, we highly recommend checking the related 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.
Problem: The client needed help with translating strings in PHP code that were not properly wrapped for translation. Solution: First, we guided the client to wrap all texts in gettext calls as per our documentation. Specifically, we advised checking step number 2.
After modifying the code, we instructed the client to use the String Translation feature in WPML to translate the modified string. The steps included enabling the "Look for strings while pages are rendered" option, visiting the front end to render the string, and then searching for the string in the String Translation interface.
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.
Problema: Stai cercando di visualizzare diversi filtri nella pagina shop in inglese del tuo sito, ma vedi solo il filtro 'Marca' con il label in italiano. Utilizzi l'opzione 'usa la traduzione se disponibile oppure lascia la lingua predefinita' per i prodotti, che sono circa 20.000 e non vuoi tradurli manualmente. Soluzione: Il problema principale è che non puoi tradurre le tassonomie se imposti i prodotti sul 'fallback nella lingua di default'. I prodotti non esistono nell'altra lingua, mentre la tassonomia sì, e non puoi assegnare una tassonomia a un prodotto che non esiste in quella lingua. Il filtro 'Marca' appare perché non è stato tradotto, dato che il nome delle marche è lo stesso in tutte le lingue. Per risolvere questo, devi duplicare i prodotti. Per la duplicazione automatica di nuovi prodotti, puoi utilizzare degli hook specifici di WPML. Consulta i seguenti link per maggiori dettagli:
Se questa soluzione non risolve il tuo problema o se ritieni che le informazioni siano obsolete, ti invitiamo a aprire un nuovo ticket di supporto. Ti consigliamo inoltre di verificare le problematiche note, controllare la versione della soluzione permanente e confermare di avere installato le ultime versioni dei temi e dei plugin.
Problema: Stai migrando dati da un sito immobiliare multilingue a una nuova configurazione utilizzando il plugin WP All Import Pro insieme all'add-on Houzez e WPML per le traduzioni. Hai bisogno di mantenere gli ID originali per preservare le relazioni esistenti tra agenti, proprietà e traduzioni. Durante il processo di importazione, WordPress genera nuovi ID sia per le proprietà che per gli agenti, e non è chiaro come assicurare che tutte le traduzioni per proprietà e agenti siano correttamente connesse e collegate alle loro versioni originali. Soluzione: Le traduzioni non possono avere lo stesso ID degli originali perché sono post diversi e ciò causerebbe un errore fatale. Questo è dovuto al funzionamento di WordPress, non a WPML. Se stai importando questi contenuti in un sito già esistente che non è vuoto, è probabile che gli ID dei contenuti importati siano già assegnati a qualche altro post, quindi WPML non può utilizzare gli stessi ID che avevi nel vecchio sito. Purtroppo, WPML non dispone di hook o strumenti per mappare i record importati alle loro corrispondenti traduzioni basate su un identificatore unico esterno. L'unica soluzione è rimappare le relazioni manualmente.
Se questa soluzione non risolve il tuo problema o sembra non essere più attuale, ti consigliamo di aprire un nuovo ticket di supporto. Ti raccomandiamo inoltre di controllare i problemi noti, verificare la versione della correzione permanente e confermare che hai installato le ultime versioni di temi e plugin. Per ulteriore assistenza, visita il forum di supporto WPML.
Problem: You are trying to remove WooCommerce's strings from the database using the 'Remove strings by domain' feature, but it has no effect. Even though you receive a success message, the strings remain in the database. Solution: 1. The 'Remove strings by domain' feature only deletes untranslated strings. If the string is translated, it won't be affected. 2. To delete strings manually, go to String Translation, select the WooCommerce text-domain, and delete the strings. You can show all results using the "Strings per page:" filter below the strings table. 3. If you need to remove strings directly from the database, use the following SQL queries:
DELETE FROM wpif_123_icl_strings WHERE context = 'woocommerce';
DELETE FROM wpif_123_icl_string_translations WHERE string_id IN (SELECT id FROM wpif_123_icl_strings WHERE context = 'woocommerce');
Please note that this custom code is a courtesy and is not officially supported by us. Before applying it to a live site, please test it in a staging environment.
If this solution does not apply to your case, or if it seems outdated, we recommend opening 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. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.
Problem: You have created an ACF select field and are trying to dynamically pass a list of posts filtered by language using a filter. Solution: We recommend creating a new variable to capture the current language using the WPML hook. You can find more information about this hook here: https://wpml.org/wpml-hook/wpml_current_language/ Example:
Then, use a conditional statement to filter the posts by the language code. Here are two examples of how you can implement this:
// Conditional switch statement based on the current language
switch ( $current_language ) {
case 'fr':
// your French post IDs
break;
default:
// Default case for default language post IDs
break;
}
or
// Conditional logic based on the current language
if ( $current_language === 'fr' ) {
// your French post IDs
} else {
// your English post IDs
}
If this solution does not resolve your issue or seems outdated, 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 needed.
Problem: If you're experiencing a PHP Fatal error when updating a product variant in WooCommerce that exists only in a non-main language, it might be due to the variant's original ID missing in the database. This issue can occur if the original variant was removed while WPML was disabled or due to an external process, leading to potential database corruption. Solution: We recommend running the ghost cleanup process in WPML to resolve this issue. Please navigate to: WPML → Support → Troubleshooting Then, select: "Remove ghost entries from the translation tables". This action should help clear any discrepancies in the database related to missing original IDs.
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. Should the problem persist, please do not hesitate to open a new support ticket at WPML support forum for further assistance.
Problem: El cliente necesita que el desplegable de idioma en la versión móvil de su sitio web se abra hacia arriba, ya que la cabecera está en la parte inferior en esta versión. Además, desea mostrar solo las iniciales de los idiomas en el desplegable, sin banderas. Solution: Para que el desplegable de idioma se abra hacia arriba en la versión móvil, es necesario crear una solución personalizada, ya que WPML no ofrece esta opción por defecto. Recomendamos contactar a uno de nuestros partners certificados para desarrollar esta funcionalidad. Además, para cambiar la visualización en el desplegable a solo iniciales de idiomas, siga estos pasos: 1. Vaya a WPML -> Idiomas -> Sección 'Idiomas' -> Click en el enlace de editar idiomas. 2. Cambie el nombre de los idiomas a sus iniciales. 3. Guarde los cambios.
Si esta solución no resuelve su problema o si la información proporcionada se ha vuelto obsoleta, le recomendamos abrir un nuevo ticket de soporte. También es aconsejable revisar los problemas conocidos y asegurarse de que tiene instaladas las últimas versiones de los temas y plugins. Para más asistencia, visite nuestro foro de soporte.
Problem: The client is unable to translate the cookies notice on their website after modifying the text, and the provided WPML documentation did not resolve their issue. Solution: We recommend updating the gettext code in your theme or plugin files to ensure proper translation string and text domain usage. Here are the steps: 1. Update your gettext code to include the correct text domain and ensure the URL is wrapped appropriately for translation. For example:
<div class="message"><br /> <?php echo sprintf(<br /> esc_html__( 'We use cookies to improve your user experience. %s', 'your-text-domain' ),<br /> '<u><b><a href="https://mp-performance.ae/privacy-policy">' . esc_html__( 'Learn more', 'your-text-domain' ) . '</a></b></u>' <br /> ); ?><br />
2. Scan the theme or plugins for strings using WPML's String Translation. 3. Translate the strings as needed in WPML.
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: If you're experiencing issues where the language selector does not change the language on blog posts, and instead links to the current language rather than the selected alternate language, the issue might be with your theme's functions.php file. Solution: In this case, the issue was caused by a function inside the functions.php file of a Child Theme:
This code modifies the blog post links and can interfere with the WPML language switcher. Removing this snippet should allow the language switcher to function correctly.
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, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Additionally, you can open a new support ticket for further assistance at WPML support forum.