Translation of the calendar menu

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 7 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29355

    Hello, the calendar is not translated on the published pages, ex: http://www.notredamedevie.org/diario/ et http://www.notredamedevie.org/agenda/ It is always the English version that is displayed (environment WP 4.9.1, Polylang, multisite). The calendar does not appear in the corresponding language (while the events correspond to the display language). Thanks, Peter

    Pierre Gauer
    #29397

    Hi Pierre,

    After initially testing this I found that it worked for me.

    However, I’ve noticed that I was using mysite.com/fr/agenda and mysite.com/it/diario* – whereas your site is not including the language code. When I changed the polylang settings I found that without the language code, it did not work for me.

    The setting says the language is inferred from the post/page itself (so I had a french page called ‘agenda’, an italian one called ‘diario’). However, it does not appear to be changing the $wp_locale constant, as it does when the language code is present in the url.

    This seems to me to be a bug with Polylang. I suspect that actually the Polylang is changing the $wp_locale global but is doing to so too late. It might not necessarily be a bug, it could be that is not technically feasible to do it sooner. The strings for the calendar (days of week, months etc) are all set on the init hook, so if Polylang changes it after then, it will be too late.

    Could you contact the author of Polylang and raise this issue with them. In short:

    • “The language is set from the directory name in pretty permalinks” setting sets the locale of $wp_locale on/before init.

    • “The language is set from content” does not

    If it’s not something that the developer is able to fix, then I will look into what changes Event Organiser can make.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.