Problem: The client is testing WPML on a new site with both Yoast and WPML SEO plugins installed but is facing an issue where the canonical tag is not being created automatically. Solution: If you're experiencing issues with canonical tags not being automatically created, it's important to note that with Yoast SEO active, all SEO data, including canonical tags, are managed by Yoast SEO. However, if Yoast SEO is not in use, WPML should handle this. Since Yoast SEO is active on your site, canonical data should automatically be added when you create a post or page. If there are issues with canonical tags on translations, ensure that the WPML SEO plugin is activated. Start by activating the WPML SEO plugin, then run the Yoast SEO optimization and check again. Create a new page, translate it, and verify if the canonical URLs are displaying correctly.
If this solution does not resolve your issue or seems irrelevant due to being 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 further assistance is needed, please open a new support ticket at WPML support forum.
Problem: The client wants to create custom design buttons for the mobile navigation that change the language of the website. Solution: We recommend creating a custom language switcher. You can find detailed instructions on how to do this by visiting Custom Language Switcher. Please note that customization falls outside our standard support offerings.
If this solution does not apply to your situation, or if it seems outdated, we encourage you 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. For further assistance, please visit our support forum at WPML Support Forum.
Problem: The client was unable to translate a string on their website, and some methods were deprecated in the admin interface. The main issue was that the English header was not displaying correctly, showing a Persian header instead. Solution: We identified that the issue was related to the use of a legacy widget that was no longer compatible. To resolve this, we guided the client to make corrections in the widget settings. We provided a direct link to the widget settings page and instructed the client to adjust the widget language each time edits were made. After making these adjustments, the issue with the string translation was resolved.
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 the problem persists, please open a new support ticket.
Problem: You are working on a site under development and need to programmatically fetch the users' preferred language. You are wondering if this information is stored in the usermeta table. Solution: The preferred language of a user is stored in the usermeta table under the key 'locale'. By default, this value might be empty, indicating that the admin language is set to the site's default. If a specific language is set in the user's profile, it will reflect that particular locale (e.g., English > en_US). Here is a step-by-step approach to fetch this information:
function get_user_preferred_language( $user_id ) {
// Attempt to retrieve the 'locale' meta value for the user
$locale = get_user_meta( $user_id, 'locale', true );
// Check if 'locale' is empty and fall back to WPML's default language if necessary
if ( empty( $locale ) ) {
// Use WPML's default language as a fallback
$locale = apply_filters( 'wpml_default_language', null );
}
return $locale;
}
// Usage example:
$user_id = get_current_user_id();
$user_language = get_user_preferred_language( $user_id );
echo "User's preferred language: " . $user_language;
If this solution does not apply to your case, or if it seems outdated, we 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 is attempting to convert posts into custom post types (CPT) based on their categories, ensuring that translations remain attached and old permalinks redirect to the new ones. They encountered issues where not all translations transferred during the migration using WPCLI. Solution: We recommend disabling the WPML plugin initially to ensure all posts are correctly converted to the new CPT without language complications. Once this is done, re-enable WPML and manually connect the posts as translations. This can be done either through the WPML interface or programmatically using the
Please note that this solution might be outdated or not applicable 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 the issue persists, please open a new support ticket for further assistance.
Problem: The client is trying to translate a site from English to Spanish using WordPress/WooCommerce. However, the translated page does not display as expected. Instead of the expected URL, an incorrect URL is shown, and the WordPress title and search bar issues are present. Solution: We recommended translating the header "template part" using Translation Management. This can be done by navigating to the Translation Management section in the WordPress admin panel. Here is a step-by-step guide: 1. Go to your WordPress admin area. 2. Navigate to Translation Management. 3. Translate the header "template part". After applying these changes, the issue with the URL and the display of the WordPress title should be resolved.
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 the problem persists, please do not hesitate to open a new support ticket at WPML support forum.
Problem: The client has a website with four currencies and has set up WPML MultiCurrency based on the site's language. However, PayPal does not accept KM and DEN currencies, and the client wants PayPal to automatically convert amounts in these currencies to EUR. Despite configuration efforts, the client still encounters the error: 'CURRENCY_NOT_SUPPORTED Currency code is not currently supported.' Solution: We recommend using specific WCML hooks to filter and modify the currency code before it is sent to PayPal. Here are the steps: 1. Use the
If this solution does not apply to your case, or if it 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 for further assistance at WPML support forum.
Problem: The client is trying to change the button label from 'Book now' to 'Add to Cart' and translate it to German ('Zum Warenkorb hinzufügen') using WooCommerce Bookings. Despite modifying the functions.php file and using WPML to scan and translate the string, the German translation does not appear on the products. Solution: We recommended the client to ensure that the custom code in functions.php is correctly using the WPML translation function. Here is the code snippet that should be used:
We also suggested reproducing the issue in a new WordPress installation to determine if the problem is specific to the client's site or a general issue. If the problem persists, it might be necessary to review the theme or plugin compatibility or other specific configurations on the original site.
If this solution does not resolve the 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.
Problema: El cliente tiene una página con código PHP incrustado en un artículo a través de un iframe. Aunque ha definido correctamente el cambio de idioma y ha utilizado la función de traducción de cadenas de WPML, las traducciones solo funcionan en las páginas en español, mientras que en inglés no se reflejan correctamente. Solución: Primero, es importante entender que WPML solo puede traducir contenido y cadenas que están en la base de datos o en los archivos de plugins y temas. Los iframes, al ser código externo, no son accesibles por WPML para traducción directa. Si el contenido del iframe está desarrollado dentro de un tema o plugin de WordPress, el cliente debe: 1. Ir a WPML -> Localización de temas y plugins para escanear las cadenas. 2. Luego, traducir estas cadenas en WPML -> Traducción de Cadenas. Para descargar archivos .po, el cliente puede:
Acceder a WPML -> Localización de temas y plugins, y al lado de cada tema o plugin escaneado, seleccionar la opción para crear el archivo .po.
Ir a WPML -> Traducción de Cadenas y al final de la página, en el bloque de la derecha, escoger el dominio y descargar el archivo .po.
Si esta solución no resuelve el problema o si parece desactualizada, recomendamos abrir un nuevo ticket de soporte. También es aconsejable revisar los problemas conocidos, verificar la versión de la solución permanente y confirmar que se han instalado las últimas versiones de los temas y plugins. Para asistencia adicional, por favor visite nuestro foro de soporte.