Widget language issue

This topic contains 14 replies, has 4 voices, and was last updated by  Stephen Harris 10 years, 8 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #3082

    Great plugin! Looking forward to the upcoming premium version.

    I am having a bit of an issue with Danish in the widgets. Language files are present. Locale is set correctly to da_DK. The event template is picking up on this without a hitch, but the widgets don’t seem to care at all. The go on using English as if nothing happened.

    Anybody else experience something like this?

    madsmao
    #3083

    And it gets weirder. I just reloaded my page, and now the language seemed to work for the calendar widget (but not the agenda widget). However, as soon as I navigated to the next month in the calendar widget the language swapped back to english.

    madsmao
    #3086

    Hi madsmao

    Are you using a multi-lingual plug-in to switch between languages, or are you just setting the language in your config file? You should find that you need to reload the page for the language changes to take effect.

    Looking at the agenda widget I’ve noticed that the transient (caching) key doesn’t depend on the locale – so its probably serving up a cached copy of the agenda widget. This should sort itself out after about 24 hours – but I shall fix this for 1.7.

    As for the calendar widget – this seems to work as expected for me. After page loading the language changes, and doesn’t switch back when navigating. Are you running 1.6.3? Can you post a link to your site?

    Stephen Harris
    #3090

    I have tried setting the language using both a plugin and hardcoded into wp-config. Same result. I also did reload the page after making changes ๐Ÿ˜‰

    Caching could be the source of this issue. I was thinking about the same thing myself. Is it your plugin managing caching of the widget or is this a WordPress feature? Where is the widget cached: db or disk? Nuking the browser cache (and W3TC) does not seem to have any effect.

    I will provide you with a link to the site if I can not figure it out myself, but I think I will have a go first based on your input. Thanks a lot ๐Ÿ™‚

    madsmao
    #3091

    Its cached using the db (transient). Each query of the agenda widget (corresponding to each ‘page’) is kept in an array indexed by a key (a hash of the query). This entire array is stored as a transient. (The reason why each query isn’t stored as its own separate transient is to do with clean-up and not polluting the database with transients an indefinite number of queries).

    As you can see here, the key does not contain the locale being used. After appending get_locale() to the key, it recognizes language changes. The cache is also cleared if any event is edited, or if some options (such as timezone) are changed. Editing the widget settings also clears the cache.

    Later I’ll push this change to the development branch of 1.7.

    Stephen Harris
    #3092

    Thank you so much for your very detailed feedback. I might want to take a look at 1.7 too just to see if it solves any of my issues. Should be quite simple to pull your code as a git submodule into my local filesystem.

    I’ll keep you posted on my progress. Thanks again for your efforts so far ๐Ÿ™‚

    madsmao
    #3093

    No worries, I’ve just pushed some changes to the the dev-1.7 branch if you wanted to test them out (844ed3518)

    Stephen Harris
    #6855

    Hi- I’ve installed the pro version and love this plug-in. Great work! The site I’m working on is in French – frontend and backend and installed on a server in France. But, I notice that with a recurring event I receive this “This event is running from 10 septembre 2013 until 10 dรฉcembre 2013. It is next occurring on 10 septembre 2013 10:00.” Obviously, not completely in French.

    How can this issue be resolved?

    Here is the website: mosaique-des-sens.fr

    Thanks in advance!
    Christina

    MosaiquedesSens
    #6856

    And here is the specific page http://www.mosaique-des-sens.fr/events/event/stage/. Sorry about that!

    Christina

    MosaiquedesSens
    #6857

    Hi Christina,

    I’m glad you like the plug-in :).
    It seems there hasn’t been a translation provided for that text. There are two ways of editing that text.

    • Copy the template event-meta-single-event.php (its in event-organiser/templates/) into your theme, and edit the text. This also gives you the freedom to rearrange, remove/add event information.
    • Or register at http://wp-event-organiser.com/i18n and provide a translation for the text (its in the free version). That will be included in the next major update.

    Event Organiser’s french translation is currently just over 70% (but a lot of the ‘missing’ texts are not typically visible). Pro is nearly 100%.

    Finally, 1.3.2 has just been released and this fixes some errors in the .mo translation files. Since you’re running a localised version of Event Organiser, you’ll want to update to that!

    Stephen Harris
    #6904

    I’m also having an issue with the widget not translating. Everything else is translating fine but the widget still shows “You have not made any bookings” when I changed it to “You have not RSVP’d to any events”

    Erica Eide
    #6990

    Wondering if anyone has a solution to my post above on Aug 7… thanks!

    Erica Eide
    #6994

    Hi Erica,

    Sorry, missed this one! How are you changing the text? Are you editing the .mo file? Or the .po file? Or are you using a custom template for the “events attending” widget? (Using a custom template, rather than translating the text would be more appropriate here I think).

    Stephen Harris
    #7010

    Edited .po file with poedit, no custom template for the widget. Again, all other texts are translating fine, just not the widget ๐Ÿ™

    Erica Eide
    #7013

    And just to check – did you update the .mo file too? If you want to email me the .po & .mo I’ll be happy to test them out. (Also if you’re editing the .po and .mo files, you’ll want to put them in your wp-content/languages folder (create it if it doesn’t exist) – that way you’re changes are not over-ridden when you update the plug-in).

    Stephen Harris
Viewing 15 posts - 1 through 15 (of 15 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.