Background of the issue:
I am developing a site and have set a custom date format (j F Y) under Settings > General in WordPress. I am using get_the_date('') to display the date for custom post types on a page. The default language of the site is English. To debug, I printed the following code to check if the correct language is loaded on the page, and it seems fine:
Symptoms:
The month name is displayed correctly in English and Dutch but appears in English instead of the correct language for German, Polish, Italian, Spanish, Hungarian, and French.
Questions:
How can I ensure the month name is displayed in the correct language?
While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.
Enable the "Look for strings while pages are rendered" option in WPML > String Translation, visit the page where the string should appear, and then search for the string again in WPML > String Translation. Translate them
Thank you for your suggestion. I have enabled the "Look for strings while pages are rendered" option and visited the relevant pages as instructed. However, I am unsure which strings I should now expect to see under WPML > String Translation.
It’s worth mentioning that the Dutch month names are displayed correctly, even though I haven’t translated them manually via String Translation. This seems to indicate that the translations for Dutch are handled automatically, which I would expect for other languages as well.
I had assumed that WPML would handle the translation of month names automatically, as these are native to WordPress and typically rely on the language settings.
Could you clarify if month names should appear as translatable strings in this section, or if there’s another configuration required to ensure that they display correctly for all languages?
Thank you for the updates. A couple of requests for tracking this issue.
1) Please fill in the private details fields after a full site backup. I would like to access the admin area of your site to check further. Refer to the following links for more details about our private information sharing policies.
2) Also, please let us know the exact steps to reproduce the bug on your site. It would be great if you could share a couple of screenshots or a screencast for a better understanding.
--
Thanks!
Bigul
The topic ‘[Closed] Month name not translating correctly in custom date format’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.