Foren
Alloyui calendar localization ?
Tom Mahy, geändert vor 12 Jahren.
Alloyui calendar localization ?
Regular Member Beiträge: 103 Beitrittsdatum: 11.05.11 Neueste Beiträge
Hi,
Im trying to use the calendar in french.
On the API page : http://alloy.liferay.com/deploy/api/Calendar.html
It tells me you can localize, however there doesnt seem to be a property for it.
Changing language in liferay doesnt help, and changing the browser language is not an option.
any ideas ?
Thank you.
Im trying to use the calendar in french.
On the API page : http://alloy.liferay.com/deploy/api/Calendar.html
It tells me you can localize, however there doesnt seem to be a property for it.
Changing language in liferay doesnt help, and changing the browser language is not an option.
any ideas ?
Thank you.
Tobias Rettstadt, geändert vor 12 Jahren.
RE: Alloyui calendar localization ?
New Member Beitrag: 1 Beitrittsdatum: 01.06.11 Neueste Beiträge
Hi Tom,
you can set the locale on the calendar object as a configuration attribute. Only English locales are predefined, but you can define your own locales by following the instructions described here: https://developer.yahoo.com/yui/3/api/DataType.Date.Locale.html
Here is an example for changing the locale for a datepicker:
Hope this helps.
Best regards,
Tobias
you can set the locale on the calendar object as a configuration attribute. Only English locales are predefined, but you can define your own locales by following the instructions described here: https://developer.yahoo.com/yui/3/api/DataType.Date.Locale.html
Here is an example for changing the locale for a datepicker:
A.DataType.Date.Locale['de_DE'] = A.merge(A.DataType.Date.Locale['en'],{
B: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
a: ['So','Mo','Di','Mi','Do','Fr','Sa']
});
var datepicker1 = new A.DatePickerSelect({
calendar: {
locale: '<%= themeDisplay.getLocale().toString() %>'
}
}).render('#dynamicDatePicker');
Hope this helps.
Best regards,
Tobias
Seyed Mohammad Hossein Jamali, geändert vor 10 Jahren.
RE: Alloyui calendar localization ?
Junior Member Beiträge: 77 Beitrittsdatum: 13.12.09 Neueste Beiträge
the link https://developer.yahoo.com/yui/3/api/DataType.Date.Locale.html is dead!
Thanks a bunch!
Thanks a bunch!