Translating the days (st, nd, rd, th)

Home Forums Additional Help Translations Translating the days (st, nd, rd, th)

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1051917
    Jørgen
    Participant

    Hey! I’m running a site in Norwegian and these string were not automatically translated. I was able to translate some strings, like “Next”, “Previous”, and some others, but I cant find the strings for these “words” when looking in the .PO file.

    Any ideas? It doesnt look good with some english and some norwegian.

    #1052173
    Cliff
    Member

    Hi. Thanks for your question.

    We’ve got these instructions:

    Please reference that information and let me know if you need any further assistance.

    #1053158
    Jørgen
    Participant

    Yes I’ve already looked through all the strings, but I cant seem to find the string(s) that changes the “rs,st, nd…” strings 🙂

    #1054283
    Cliff
    Member

    I’m not exactly sure how ordinal indicators (e.g. st, nd, rd, th) are handled for translations, but one thought is maybe you could try switching to another language (https://translate.wordpress.org/projects/wp-plugins/the-events-calendar/stable and http://translations.theeventscalendar.com/projects/tribe-events-calendar-pro both say German is currently 100% translated for The Events Calendar core and PRO, respectively) and seeing if the ordinal indicators still do not get translated.

    If they DO get translated for another language (e.g. German), then it’s not a coding issue of making the string translatable.

    If they DO NOT get translated for another language (e.g. German), then it might be a bug in the code that I can narrow down further and report to our developers. If this is the case, please provide me screenshots of anywhere you notice it not translating, along with the URL for each screenshot (so I can determine which template file is in use).

    Thanks for your help narrowing down this issue!

    #1057911
    Jørgen
    Participant

    I changed it to german and the issue was still there. It seems the issue lies within the widgets when using shortcode.
    As shown here https://i.imgur.com/2rMsWU9.png (http://www.vikoibo.org/)

    The shortcode I use is [tribe_this_week count=”5″]

    Thank you for helping me 🙂

    – Jørgen

    #1058109
    Cliff
    Member

    Thanks for the screenshot and shortcode example.

    FYI: Your site link requires logging in, but don’t worry about it.

    I tested the shortcode in German and French and neither translated the ordinal indicators/suffixes.

    I looked into the code and figured out the shortcode and widget (same code base) output via WordPress’ date_i18n function.

    As such, if I’m understanding everything completely, the translation for English ordinal indicators/suffixes should be in WordPress core language files.

    However, I’ve notified our developers of this issue in case there’s anything they can optimize in their usage of date_i18n() for this issue in the future.

    A workaround you could implement right away is to just remove the ordinal indicator in your date format by going to wp-admin > Events > Settings > Display > Date Format Settings section > Week Day Format option and change it from the default “D jS” (e.g. Mon 18th) to “D j” (e.g. Mon 18) or any other valid PHP date format. FYI: The “S” in the date formatting is what adds the ordinal indicator.

    I hope this information helps. Please let me know how it goes for you.

    Thanks.

    #1059702
    Jørgen
    Participant

    aaah! Brilliant 🙂 Thank you!

    #1060296
    Cliff
    Member

    Glad I could help! This one took me a while, but I think we got a good workaround. 🙂

    Have a great weekend!

    #1088768
    Leah
    Member

    Hello,

    Thank you for reporting this issue. We weren’t able to get a fix for it into our upcoming release (4.1). However, please know that the problem is still on our radar and is ticketed within our system to be addressed in a future maintenance release. We’ll do our best to keep you posted when we are able to get a solution in place. Thank you for your patience while we improve and expand our plugins.

    Best,
    Leah

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Translating the days (st, nd, rd, th)’ is closed to new replies.