This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Exception
This topic contains 3 replies, has 0 voices.
Last updated by Lauren 1 week, 2 days ago.
Assisted by: Lauren.
Author | Posts |
---|---|
September 17, 2025 at 2:33 pm | |
sebastianS-152 |
Background of the issue: Symptoms: Questions: |
September 18, 2025 at 4:30 pm #17414311 | |
Lauren WPML Supporter since 10/2015
Languages: English (English ) Timezone: America/New_York (GMT-04:00) |
Is it okay with you if I install and activate a plugin called String Locator? I believe this may help me find the location of the string that is causing the issue. |
September 30, 2025 at 1:53 pm #17445285 | |
sebastianS-152 |
Yes that's fine for me - thanks for getting back to me and sorry for the delay! |
October 1, 2025 at 2:49 pm #17449237 | |
Lauren WPML Supporter since 10/2015
Languages: English (English ) Timezone: America/New_York (GMT-04:00) |
I was able to resolve this by pasting a custom function in your theme's functions.php file. I recommend creating a child theme and moving it there, otherwise whenever you update the theme, it will get overwritten. I'm also reporting this to our development team so that they can fix this permanently. The snippet, so you have it in case you need it again, is this: add_filter('gettext', 'wpml_date_format_multilingual', 10, 3); function wpml_date_format_multilingual($translated, $original, $domain) { // Only run in admin and only for sitepress domain if ($domain !== 'sitepress' || !is_admin()) { return $translated; } // Only check for date format strings if ($original !== 'g:i a T' && $original !== 'F j, Y') { return $translated; } $current_lang = apply_filters('wpml_current_language', NULL); // Date format translations if ($original === 'F j, Y') { switch ($current_lang) { case 'de': // German return 'j. F Y'; // 1. Oktober 2025 case 'cs': // Czech return 'j. F Y'; // 1. října 2025 case 'fr': // French return 'j F Y'; // 1 octobre 2025 case 'es': // Spanish return 'j \d\e F \d\e Y'; // 1 de octubre de 2025 } } // Time format translations (24-hour for all) if ($original === 'g:i a T') { switch ($current_lang) { case 'de': // German case 'cs': // Czech case 'fr': // French case 'es': // Spanish return 'H:i T'; // 15:19 CEST } } return $translated; } Please let me know if you need any further assistance and I will be happy to help. |