Support » Plugin: WP Chrono » Display time/date in secondary language with WPML

  • Resolved 972 creative

    (@toddedelman)


    Hi there

    When using this plugin on a translated page via WPML, the time and date are currently displayed in the primary language. See http://prntscr.com/fvqz71.

    Since this is a secondary language, the text should display in that secondary language.

    Thanks for your help,
    Todd

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author milan.latinovic

    (@milanlatinovic)

    Hi Todd,

    Welcome back, I examined problem that you described, and this is what I came up with. WP Chrono is actually already supporting translation and multi-language. Having that in mind, if your web site has properly configured secondary language and properly translated days, then the plugin will print out days fine (if not, default is English).

    For example, this is working WP Chrono on Deutsch web site: http://prntscr.com/fwl449
    Notice that Monday is translated to Montag.

    Plugin actually uses WordPress function which does this by default, so WP Chrono is small plugin, and is not affecting translations, it simply prints out what the rest of the WordPress mechanism provides.

    Having that in mind, I see two ways you can handle your issue:
    1) Examine if translations for days are working correctly (this issue is not related to WP Chrono plugin)
    2) Use some different format, which will print only numbers without name of the day.

    For example, if you use this format:
    [wpch-currentdate format=”l Y-m-d G:i:s”] , l – stands for full name of the day
    you will get name of the days.

    If you remove l:
    [wpch-currentdate format=”Y-m-d G:i:s”] – name of the day won’t be included

    I hope this will help you in resolving your issue.
    All best,

    Hi Milan

    Thanks for taking the time to look this over. I’m not sure I understand though what you’re assuming the issue is.

    Take a look at this: http://prntscr.com/fwlvq7. I set the site language to Hebrew and then checked the page where I used your shortcode and it was still appearing in English.

    Any further help would be appreciated.

    Regards,
    Todd

    Plugin Author milan.latinovic

    (@milanlatinovic)

    Hi Todd,

    From what I can see on the last screenshot you provided, your site is only partially translated to Hebrew (your navigation is in English, most of the back-end also). For example, look at the screenshot from my German web site (almost everything is translated, including days in a week).

    https://prnt.sc/fwn6pf

    From what I can tell, issue is not related to WP Chrono plugin. I think that your Hebrew translations are not complete, you probably want to examine your .mo and .po files.

    Also, one approach would be to disable all plugins and switch back to default theme, and then to figure out if you have some plugin-collision.

    I hope this helps.

    All best,

    Plugin Author milan.latinovic

    (@milanlatinovic)

    Todd,

    WP-Chrono is using WordPress function date_i18n() to print all dates to web site in localized form.

    https://developer.wordpress.org/reference/functions/date_i18n/

    There is similar support thread of WPML, and they are pointing to .mo files and translations. https://wpml.org/forums/topic/how-to-localize-date/

    If you want to open ticket with WPML, I find that completely ok, but I would suggest examining your .mo files first. If, on the other hand WPML spots anything non-complaint within my plugin, I will be happy to change it and publish in a new version.

    Please, keep me informed about what happens with this issue, I’m really curious to see it trough.

    All best,
    Milan

    Plugin Author milan.latinovic

    (@milanlatinovic)

    Hi Todd,

    Just wanted to double check on you if you were able to resolve your issue? Have you contacted WPML support and checked your .mo files?

    I did one more check on my plugin and found nothing further to optimize, related to this issue. Also, I tested this plugin on WPML installation and found no problems. I will mark this thread completed for now, but if needed we can reopen it again.

    All best,
    Milan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display time/date in secondary language with WPML’ is closed to new replies.