10390 Posts in 2202 Topics by 1712 members
| Go to End | ||
| Author | Topic: | 4296 Views |
-
Re: Event Calendar and locale

1 October 2009 at 5:32am
Thanks for that. I'm really bad with i18n stuff, so if anyone has some code to contribute, I'll ratify it and check it in. Being in the US, as ashamed as I am to say it, I rarely have to deal with this stuff, so I've never really gotten the exposure to it. I'd love for my modules to be as accessible as possible, though, so please lend a hand if you can.
-
Re: Event Calendar and locale

24 March 2010 at 9:07am
@alexanm how you solved the problem? Seems to work on your site?
Btw. the widgets on the homepage are selfmade? -
Re: Event Calendar and locale

29 March 2010 at 5:44am Last edited: 29 March 2010 5:49am
The problem is, that i18n::set_locale(); does not call setlocale, so functions like strftime don't know that the locale has changed.
The simplest fix for this is to call setlocale after calling i18n::set_locale().
Example: mysite/_config.php
i18n::set_locale('de_DE');
setlocale(LC_TIME, 'de_DE.UTF8') //for a linux/unix server.
You can also use LC_ALL to set the other locale relevant things as well, see the php documentation for setlocale.IMHO this behaviour should be changed in sapphire/core/i18n.php, so that set_locale includes this call to setlocale():
static function set_locale($locale) {
if ($locale){
self::$current_locale = $locale;
setlocale(LC_ALL, $locale);
} -
Re: Event Calendar and locale

10 September 2010 at 3:53am
I had a similar problem: Translation in the CMS Backend worked, but dates and times (only from event_calendar!) where shown in english instead of german.
Hack:
put the following line into CalendarUtil.php function i18n_date so that it looks like this:public static function i18n_date($char, $ts)
{
setlocale(LC_ALL, i18n::get_locale());
return strftime($char,$ts);
}Seems like php forgets the locale. Setting locale in _config did not work for me
-
Re: Event Calendar and locale

2 June 2011 at 4:08am
Hello all!
I have managed to set the EventCalendar to German. All works fine except the one special character in the monthNav (March = März) it does show the "ä" in the headline of the description page but why not in the calendar widget monthNAV? Any idea how I can fix that?
kind regards
PS: included a screenshot
| 4296 Views | ||
| Go to Top |


