10448 Posts in 2223 Topics by 1719 members
| Go to End | Next > | |
| Author | Topic: | 2408 Views |
-
Re: Event Calendar: New Feature

29 August 2009 at 8:58am Last edited: 29 August 2009 9:14am
UncleCheese, it seems like you could fix all the "make sure date is correct" stuff with
public static function getDateFromString($str)
{
return date('Y-m-d', strtotime($str));
}This even allows for URLs like "/today" etc.
Maybe trade in the date()/strtotime() for strftime()/strptime() for the locale support. And check if strtotime() returns a valid timestamp.
-
Re: Event Calendar: New Feature

29 September 2009 at 9:30pm
How can I localize $LiveCalendarWidget, this is what I'm looking for my home page but I have to translate some elements into polish.
I see some mnemonics likebut translating it in event_calendar/lang/pl_PL.php<optgroup label="<% _t('LiveCalendarWidget.JUMPTOMONTH','Jump to...') %>" />
or mysite/lang/pl_PL.php has no effect. I did translation with CalendarWidget by changing into $lang['pl_PL']['CalendarWidget']['LOCALEFILE'] = 'date_pl.js'; but habe no idea how to do that with Live widget -
Re: Event Calendar: New Feature

30 September 2009 at 11:06pm
Ok as I see mnemonics are used from event_calendar/lang but only from en_US.php.
All other page elements are properly translated to polish language but $LiveCalendarWidget is not reacting.I'm setting language in Page_Controller init method like this:
if($this->dataRecord->hasExtension('Translatable'))
{
if ( ereg("^".Translatable::default_lang(), $_SERVER['HTTP_ACCEPT_LANGUAGE']) )
{
i18n::set_locale(Translatable::default_locale());
}
else
{
Translatable::set_current_locale("en_US");
i18n::set_locale("en_US");
}
} -
Re: Event Calendar: New Feature

1 October 2009 at 2:30am
I don't even see a pl_PL file in the EventCalendar module. Did you create one?
-
Re: Event Calendar: New Feature

1 October 2009 at 7:36pm
Yes I did. Now in lang dir are en_US.php de_DE.php and pl_PL.php . I did translations basing on en_US.php
and it works on almost whole calendar interface beside $LiveCalendarWidget and $CalendarFilterForm.
So I'm trying to solve it. -
Re: Event Calendar: New Feature

2 October 2009 at 1:46am
Found the problem. First, update your SVN to get a new LiveCalendarWidget.ss
Then, make sure your entry in your lang file is:
$lang['pl_PL']['LiveCalendarWidget.ss']['JUMPTOMONTH'] = 'Some Polish words';
and not:
$lang['pl_PL']['LiveCalendarWidget']['JUMPTOMONTH'] = 'Some Polish words';
-
Re: Event Calendar: New Feature

2 October 2009 at 2:56am
Ok, works great, thanks for help and fast reaction.
I hope last problem, fragments of code LiveCalendarWidget.ss:
lines 14-16<% control NavigationOptions %>
<option value="$Link" $Selected>$Month</option>
<% end_control %>and 28-34
<td class="calendarDayName">$Sun</td>
<td class="calendarDayName">$Mon</td>
<td class="calendarDayName">$Tue</td>
<td class="calendarDayName">$Wed</td>
<td class="calendarDayName">$Thu</td>
<td class="calendarDayName">$Fri</td>
<td class="calendarDayName">$Sat</td>
names of months and days are still in English which is fine when page is displayed in English. But this is multi language page with second English language and first Polish language. How to do translations for months/days names?How to change calendar to be displayed from Mondays not from Sundays or make it dependable from locales?
| 2408 Views | ||
| Go to Top | Next > |

