Problem: You are trying to translate strings in your theme, but two strings are not translating as expected. The issues identified include using a hook to register strings with variables instead of direct strings, and using a templating language with double curly braces instead of the standard PHP syntax. Solution: First, ensure that you are directly passing the strings that need translation into the function, rather than using variables. This will help WPML recognize and translate them correctly. Second, switch to using standard PHP syntax as per WordPress Coding Standards for better compatibility with WPML. We also recommend testing your theme on a WPML test site to closely examine these issues.
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 the problem persists, we highly recommend opening a new support ticket for further assistance. You can do so here: WPML support forum.
Problem: You are experiencing issues with displaying translated taxonomy terms attached to a custom post type using the function
get_the_terms()
. The terms always appear in the default language, and the
$current_ID
variable returns nothing, which prevents displaying links to the translated taxonomy terms. Solution: First, ensure that your code functions correctly in the default language. If it does, the issue might be related to how the translations and taxonomy terms are set up in WPML. Here are the steps we recommend: 1. Verify that each post and its corresponding taxonomy terms are translated into the desired languages. 2. In the WPML settings, configure your custom post type (CPT) and taxonomy to be 'Translatable - only show translated items'. 3. Check if the issue persists using a default WordPress theme, as custom themes can sometimes cause conflicts. If these steps do not resolve the issue, it might be due to outdated methods or incompatibilities with 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.
If the problem continues, please open a new support ticket with us for further assistance at WPML support forum.
Problem: Sie haben versucht, einen Buttontext für die String-Übersetzung zu erstellen und haben dazu Code in eine PHP-Datei eingefügt. Solution: Wir empfehlen in diesem spezifischen Fall die Verwendung der Funktion
Falls diese Lösung veraltet erscheint oder nicht auf Ihr Problem zutrifft, empfehlen wir Ihnen, ein neues Support-Ticket zu eröffnen. Wir empfehlen auch, die Seite mit bekannten Problemen (https://wpml.org/known-issues/) 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. Für weitere Unterstützung besuchen Sie bitte unser Support-Forum: https://wpml.org/de/forums/forum/support-in-german/
Problema: Hai dei template custom per ogni pagina del tuo sito, come page-chi-siamo.php, e quando queste vengono tradotte, devi creare nuovi template come page-about-us.php per visualizzare i contenuti tradotti. Soluzione: Per evitare di creare un nuovo template per ogni pagina tradotta, devi rendere i tuoi template traducibili e tradurli con WPML. Assicurati che i tuoi template utilizzino le chiamate GetText corrette per permettere la traduzione. Se il tema utilizza metodi non standard per richiamare i contenuti, potrebbe essere necessario consultare l'autore del tema per ulteriori chiarimenti.
Se questa soluzione non risolve il tuo problema o sembra non essere più attuale, ti consigliamo di verificare i problemi noti, controllare la versione della correzione permanente e confermare che hai installato le ultime versioni dei temi e dei plugin. In caso di ulteriori difficoltà, ti invitiamo a aprire un nuovo ticket di supporto.
Problem: The client was unable to translate the author link to point to the about page in the second language, translate sidebar category buttons, and set up a different newsletter pop-up for each language using Mailerlite. Solution: 1) For the author link, we recommended checking if the link is saved as a string that can be translated via WPML's String Translation. If not found, the client should follow the guide on finding strings that don't appear on the string translation page (documentation). Additionally, we provided a custom code solution to dynamically change the author link based on the current language using WPML functions:
2) For translating sidebar buttons, since they are part of a WordPress widget block, we directed the client to follow the steps in our guide on translating widgets (documentation). If the widgets are not appearing under Appearance > Widgets due to theme limitations, contacting the theme developer for assistance was recommended. 3) Regarding the Mailerlite pop-up, since WPML does not currently integrate with Mailerlite, we suggested manually creating separate pop-ups for each language or contacting the plugin author about potential integration with WPML.
If this solution does not resolve your issue or seems outdated, please check related known issues (here), verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If further assistance is needed, we highly recommend opening a new support ticket at WPML support forum.
Problem: You are developing a bilingual site and have a custom post type called 'portfolio'. While the taxonomy names display correctly in French, they appear in French instead of English on the English page, despite having translations set in WPML. Solution: First, ensure that you have translated the taxonomy slug or label via WPML > String Translation. Use the filter hook
wpml_translate_single_string
to retrieve the translated string. Here's how you can implement it:
For more details, follow this documentation: https://wpml.org/wpml-hook/wpml_translate_single_string If you prefer using SQL queries, you can fetch the translated name directly from the database using the following query:
SELECT st.value AS translated_text
FROM wp_icl_strings s
JOIN wp_icl_string_translations st ON s.id = st.string_id
WHERE s.context = 'WordPress' -- string domain
AND s.value = 'category'
AND st.language = 'fr'
AND st.status = 10; -- completed status
Please test this on your staging site before applying it to your production site.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. Also, 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. For further assistance, please visit our support forum: WPML Support Forum.