Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
Translate date in blog.

Solution:
Register the month name strings with the "Auto register strings for translation" option under WPML > String Translation. Now you can search for the month name in String Translation and translate accordingly.

Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#auto-register-strings-for-translation

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.

This topic contains 4 replies, has 2 voices.

Last updated by jordanP-2 1 year, 10 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 11, 2022 at 10:25 pm #11853267

jordanP-2

Hi,

I'm trying to figure out how to update the translation for the date in my client's blog posts. Here's an example: hidden link

My template file is using get_the_date

I looked at https://wpml.org/errata/not-possible-to-translate-date-suffixes-in-wordpress/ but I don't understand how to translate the string. Do I need to look at each and every date (August 4, 2022 in the link above, for example) and update them individually?

I feel like I have to be missing something. 🙂

August 12, 2022 at 9:47 am #11856257

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Yes please follow the steps mentioned in that errata (https://wpml.org/errata/not-possible-to-translate-date-suffixes-in-wordpress/) and then to translate the ordinal suffixes of dates (i.e. st, nd, rd, th), go to WPML -> String Translations (https://wpml.org/documentation/getting-started-guide/string-translation/).

You will need to translate each suffix separately (e.g. 1st, 2nd…) because it may change depending on the language. Mean, yes, you'll have to translate all those for once.

On the other hand, check this guide https://wpml.org/documentation/getting-started-guide/translating-your-sites-date-format-using-wpml/ also, for an alternative workaround.

You may also be interested in this thread https://wpml.org/forums/topic/no-translation-of-language-on-date/#post-10762833.

I hope you can find a mix 'n' match workaround.

Have a nice weekend.

August 17, 2022 at 4:41 pm #11881899

jordanP-2

Hi Waqas,

Thanks for the response. I don't think I was clear, though. I actually just want to translate the month. For example: hidden link The date says "August" when it should be "Agosto"

I tried doing a search in String Translations. The only results I get are huge blocks of text (see attached), which I don't think I want.

Does that make sense? I really just want to make sure the month appears in Spanish on the Spanish translations. Thank you!

Screen Shot 2022-08-17 at 9.40.38 AM.png
August 18, 2022 at 6:04 am #11884197

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for providing the detail.

For that month name translation, did you try the solution mentioned in this thread https://wpml.org/forums/topic/no-translation-of-language-on-date/#post-10762833? (as I mentioned in my previous message also).

Please let me know if that works for you or I'll try my best to further assist you on the matter.

Regards.

August 19, 2022 at 9:27 pm #11895457

jordanP-2

Ah, I missed that part. Thank you for pointing it out--that fixed my problem!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.