This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
Status |
Topic
|
Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Setting the time format to German
Started by: sebastianS-152
in: English Support
Problem: add_filter('gettext', 'wpml_date_format_multilingual', 10, 3);<br /><br />function wpml_date_format_multilingual($translated, $original, $domain) {<br /> if ($domain !== 'sitepress' || !is_admin()) {<br /> return $translated;<br /> }<br /> if ($original !== 'g:i a T' && $original !== 'F j, Y') {<br /> return $translated;<br /> }<br /> $current_lang = apply_filters('wpml_current_language', NULL);<br /> if ($original === 'F j, Y') {<br /> switch ($current_lang) {<br /> case 'de':<br /> return 'j. F Y';<br /> case 'cs':<br /> return 'j. F Y';<br /> case 'fr':<br /> return 'j F Y';<br /> case 'es':<br /> return 'j \d\e F \d\e Y';<br /> }<br /> }<br /> if ($original === 'g:i a T') {<br /> switch ($current_lang) {<br /> case 'de':<br /> case 'cs':<br /> case 'fr':<br /> case 'es':<br /> return 'H:i T';<br /> }<br /> }<br /> return $translated;<br />} If this solution does not apply to your case, or if it becomes 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. |
|
0 | 7 | 2 weeks, 3 days ago |