woocommerce is not using Wordpress language
Hi there
on the page www.muster-schmidt.ch I have issues with the language. It still displays certain texts in English instead of German. (I tried the languages "Germain" and German - Swiss"
I tried already deactivated all plugins, updates are done but still it is not working. Attached you find some screenshot of the chart not being partly in English and as well in the confirmation email of the client, there are English phrases too, whereas in the mails of woocommerce to the admin (you received a new order) all is fine.
In the Child-Theme there is under /languages/woocommerce/ the po and mo-Datea of woocommerce-de_CH displayed. Under /woocommerce/emails/ there are also some templates with small changes but nothing that should change the languages:
In functions.php I Force the load of de_CH language:
// Setze die Locale für WooCommerce auf Deutsch (Schweiz)
function custom_override_woocommerce_locale($locale, $domain) {
if ($domain === 'woocommerce') {
return 'de_CH';
}
return $locale;
}
add_filter('plugin_locale', 'custom_override_woocommerce_locale', 10, 2);
// Lade die WooCommerce-Übersetzungsdateien aus dem Child-Theme-Verzeichnis zur richtigen Zeit
function custom_load_woocommerce_translations() {
$path = get_stylesheet_directory() . '/languages/woocommerce/woocommerce-de_CH.mo';
if ( file_exists($path) ) {
load_textdomain('woocommerce', $path);
error_log('Sprachdatei erfolgreich geladen: ' . $path);
} else {
error_log('Sprachdatei nicht gefunden: ' . $path);
}
}
add_action('init', 'custom_load_woocommerce_translations‘);
I have no idea what I can do to fix it - can you help me with it?
Many thanks, Tanja
Comments
Hey,
Please send us the WordPress dashboard and FTP access privately through the contact form, which is on the right side at https://themeforest.net/user/muffingroup#contact and we will check what might be the reason.
Notice!
Please attach a link to this forum discussion.
Sending incorrect or incomplete data will result in a longer response time.
Therefore, please ensure that the data you send are complete and correct.
Thanks