Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

EventCalendar for Silverstripe 3


Go to End


6 Posts   1947 Views

Avatar
dacar

Community Member, 173 Posts

19 October 2012 at 10:07am

Hi UncleCheese,

i had some issues withe new EventCalendar module. After changing the lang/de.yml from https://raw.github.com/unclecheese/EventCalendar/master/lang/de.yml to

de:
Calendar:
NUMBEROFEVENTS: 'Anzahl anzuzeigender Anlässe (Standard-Ansicht).'
DEFAULTDATEHEADER: 'Standard-Titel (wird angezeigt wenn kein Datum selektiert worden ist).'
NUMBERFUTUREDATES: 'Maximal anzuzeigende Daten bei sich wiederholenden Anlässen'
UPCOMINGEVENTSFOR: 'Kommende Anlässe für %s'
FILTER: 'Filtern'
CalendarDateTime:
INVALIDFORMAT: 'Ungültiges Datums-Format. Gültig sind "dmy" oder "mdy".'
DIM: Dimensionen
DATEFORMAT: d.m.Y
TIMEFORMAT: 24
FIRSTDAYOFWEEK: Monday
CalendarEvent:
DIM: 'Wiederhole diesen Anlass'
DESCRIBEINTERVAL: 'Definiere den Zeitraum in dem dieser Anlass wieder auftritt:'
EVERY: 'Jede(n) '
DAYS: ' Tag'
WEEKS: ' Woche'
ONFOLLOWINGDAYS: 'in den folgenden Tagen'
MONTHS: ' Monat'
ONTHESEDATES: 'An diesen Daten...'
ONTHE: 'Am ...'
OFTHEMONTH: ' des Monats.'
ANYEXCEPTIONS: 'Gibt es Ausnahmen bei den sich wiederholenden Anlässen? Wenn ja, allfällige Ausnahmen unten eintragen.'
DATE: 'Datum'
RSSFEED: 'RSS-Feed dieses Kalenders'
Calendar:
BROWSECALENDAR: 'Durchsuche den Kalender'
USECALENDAR: 'Kalender benutzen um Anlässe zu finden.'
SUBSCRIBE: 'Diesen Kalender abonnieren.'
ALLDAY: 'Den ganzen Tag'
TIME: 'Zeit'
MORE: 'mehr...'
SEEALSO: 'Siehe auch'
ADD: 'Zu meinem Kalender hinzufügen'
QUICKNAVTODAY: 'Heute.'
QUICKNAVWEEK: 'Diese Woche.'
QUICKNAVMONTH: 'Diesen Monat.'
QUICKNAVWEEKEND: 'Dieses Wochenende.'
PREVIOUSDAY: 'gestern.'
NEXTDAY: 'morgen.'
PREVIOUSWEEK: 'vorherige Woche.'
NEXTWEEK: 'nächste Woche.'
PREVIOUSMONTH: 'vorheriger Monat.'
NEXTMONTH: 'nächsten Monat.'
PREVIOUSWEEKEND: 'letztes Wochenende.'
NEXTWEEKEND: 'nächstes Wochenende.'
JUMPTOMONTH: 'Monat wählen.'
CalendarEvent:
BROWSECALENDAR: 'Kalender durchsuchen.'
USECALENDAR: 'Kalender benutzen'
FILTERCALENDAR: 'Kalender filtern'
BACKTO: 'Zurück zu'
SUBSCRIBE: 'abonieren'
ADDITIONALDATES: 'Zusätzliche Daten'
CalendarWidget:
LOCALEFILE: 'date_de.js'

everything worked fine.

Greetings, Carsten.

Avatar
tiatisch85

Community Member, 5 Posts

20 October 2012 at 11:20pm

Hello Carsten,

I have also translate this file and send it to UncleCheese.
I'm translate a littlebit more in my file, see appendix.

But I have a problem to translate the Date in "$DateRange" and "$TimeRange". Have you an answer?

Thanks for help
Thomas

Attached Files
Avatar
dacar

Community Member, 173 Posts

23 October 2012 at 9:53am

hi tiatisch85,

try to use this in the _config.php:

<?php

global $customDateTemplates;
$customDateTemplates = array(
/*
 You can modify the date display by assigning new date templates to any of the following
   date scenarios. Use the above date format keys.
 */
'OneDay' 				=> '$StartDayNumberShort. $StartMonthNameShort $StartYearLong',
'SameMonthSameYear' 	=> '$StartDayNumberShort. - $EndDatNumberShort. $StartMonthNameFull $EndYearLong',
'DiffMonthSameYear' 	=> '$StartDayNumberShort. $StartMonthNameShort - $EndDayNumberShort. $EndMonthNameShort $EndYearLong',
'DiffMonthDiffYear' 	=> '$StartDayNumberShort. $StartMonthNameShort $StartYearFull - $EndDayNumberShort. $EndMonthNameShort $EndYearLong',
'OneDayHeader' 			=> '$StartDayNumberShort$StartDaySuffix. $StartMonthNameFull $StartYearLong',
'MonthHeader' 			=> '$StartMonthNameFull, $StartYearLong',
'YearHeader' 			=> '$StartYearLong'  
);

It must be $StartYearLong and not $StartYearFull.

Greetings, Carsten.

Avatar
dacar

Community Member, 173 Posts

23 October 2012 at 10:09am

... and put the following to mysite/_config.php:

setlocale (LC_ALL, 'de_DE@euro', 'de_DE.UTF-8', 'de_DE', 'de', 'ge');
setlocale(LC_TIME, 'de_DE.UTF8'); //for a linux/unix server.

[...]

Avatar
dacar

Community Member, 173 Posts

23 October 2012 at 10:26am

... and at least i have changed line 60 from CalendarWidget.php from

$locale_file = _t('Calendar.DATEJSFILE','calendar_en.js');

to

$locale_file = _t('Calendar.DATEJSFILE','calendar_de.js');

And everything works fine.

Unfortunately i dont know why even

CalendarWidget:
LOCALEFILE: 'date_de.js'
DATEJSFILE: 'calendar_de.js'

nor

$lang['de_DE']['CalendarWidget']['LOCALEFILE'] = 'date_de.js';
$lang['de_DE']['CalendarWidget']['DATEJSFILE'] = 'calendar_de.js';

wont work??? Can naybody explain?

Greetings, Carsten.

Avatar
tiatisch85

Community Member, 5 Posts

24 October 2012 at 8:43am

Thank you for the help Carsten :-)
on Windows IIS complements the setlocale with 'deu'!

setlocale (LC_ALL, 'de_DE@euro', 'de_DE.UTF-8', 'de_DE', 'de', 'ge', 'deu');

And for your question.
if you can run this script http://localhost/dev/tasks/i18nTextCollectorTask?module=EventCalenadar
have you
Calendar:
DATEJSFILE: calendar_de.js

not under CalendarWidged!

LG
Thomas