Problem: You are trying to prevent WPML from auto-translating specific links on translated pages, aiming to use English links on German pages. Despite following the provided documentation, the links still auto-translate to the targeted page translation instead of pointing to the original English page. Solution: In WPML -> Settings, you can adjust the page slug setting from "Auto generate from the title" to "Copy." This setting is mainly for languages with encoded URLs. Alternatively, you can use the "Translate" setting within the translation editor to manually set the slug, allowing you to point links to the original language page as needed. For further customizations beyond these settings, additional development might be necessary, which is outside our support scope.
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 the problem persists, please open a new support ticket.
Problem: The client is using WPML for automatic translations on their site but encounters issues where posts marked as translated do not display translations. Additionally, there are problems with translating custom post types (CPT) that use a custom table, and questions about the translation of strings on the front end and the associated costs. Solution: If you're experiencing issues with translations not appearing on posts or handling custom post types, we recommend the following steps: 1. Ensure that your CPT is registered according to WordPress Coding Standards and does not use a custom table, as WPML typically supports CPTs that follow these standards. 2. Check WPML > Settings > Custom Field translation to ensure that any custom fields used by your CPT are set to "Translate". This setting allows the fields to be translated along with the post in the WPML Translation Editor. 3. For translating custom post taxonomies, navigate to WPML > Taxonomy Translation. Taxonomies are usually translated once with the WPML Translation Editor while translating a post they are assigned to.
Unfortunately, there are no hooks available to trigger automatic translations directly after creating duplicates. However, you can manually trigger or queue translations after duplication.
If these steps do not resolve your 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 further assistance is needed, please open a new support ticket at WPML support forum.
Problem: The client is redesigning a website and wants the English menu to display in its entirety for all languages without manually creating the menu in each language. This is to avoid updating 10+ menus every time a page is added to the English menu. Solution: Currently, WPML does not support automatic duplication of menus across different languages. The client has two options: 1. Manually duplicate the menus by going to Appearance > Menus, clicking on the "+" sign to add menus in secondary languages, and inserting the English links and labels. 2. Implement a custom code solution. The client can try editing the provided code to fit their context or consult with professional contractors for assistance. The code provided earlier should be added to the functions.php file, ensuring a backup is made first due to potential risks:
$locations_to_omit = ['header']; //Append menu locations here. e.g. ['primary', 'footer']<br />add_filter('wp_nav_menu_args', function ($args) use ($locations_to_omit) {<br /> if (isset($args['theme_location']) && in_array($args['theme_location'], $locations_to_omit)) {<br /> $current_lang = apply_filters( 'wpml_current_language', null );<br /> do_action('wpml_switch_language', apply_filters( 'wpml_default_language', null ));<br /> <br /> add_filter('wp_nav_menu', function ($nav_menu) use ($current_lang){<br /> do_action('wpml_switch_language', $current_lang);<br /> return $nav_menu;<br /> }, 99);<br /> }<br /> <br /> return $args;<br />}, 1);
If these solutions do not resolve the issue or if the solution becomes 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.
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.