Widget language issue
WordPress Event Management, Calendars & Registration › Forums › Report A Bug › Widget language issue
This topic contains 14 replies, has 4 voices, and was last updated by Stephen Harris 11 years, 3 months ago.
-
AuthorPosts
-
January 21, 2013 at 10:56 am #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?
madsmaoJanuary 21, 2013 at 11:03 am #3083And 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.
madsmaoJanuary 21, 2013 at 7:11 pm #3086Hi 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 HarrisJanuary 22, 2013 at 12:29 pm #3090I 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 ๐
madsmaoJanuary 22, 2013 at 12:43 pm #3091Its 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 HarrisJanuary 22, 2013 at 2:18 pm #3092Thank 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 ๐
madsmaoJanuary 22, 2013 at 7:55 pm #3093No worries, I’ve just pushed some changes to the the dev-1.7 branch if you wanted to test them out (844ed3518)
Stephen HarrisAugust 6, 2013 at 1:10 pm #6855Hi- 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!
ChristinaMosaiquedesSensAugust 6, 2013 at 1:12 pm #6856And here is the specific page http://www.mosaique-des-sens.fr/events/event/stage/. Sorry about that!
Christina
MosaiquedesSensAugust 6, 2013 at 1:24 pm #6857Hi 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 inevent-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 HarrisAugust 7, 2013 at 10:21 pm #6904I’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 EideAugust 19, 2013 at 4:11 am #6990Wondering if anyone has a solution to my post above on Aug 7… thanks!
Erica EideAugust 19, 2013 at 1:24 pm #6994Hi 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 HarrisAugust 20, 2013 at 5:29 pm #7010Edited .po file with poedit, no custom template for the widget. Again, all other texts are translating fine, just not the widget ๐
Erica EideAugust 20, 2013 at 8:03 pm #7013And 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 yourwp-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 - Copy the template
-
AuthorPosts