-
Notifications
You must be signed in to change notification settings - Fork 22
PrimeFaces Extensions Locales
Oleg Varaksin edited this page Sep 8, 2013
·
17 revisions
Components like TimePicker and Timeline use a shared I18N text to display localized labels. PrimeFaces Extensions only provides English translations. Pack desired locales with corresponding text into a JavaScript file and add it to your application to support more locales for components that can be localized. Example for file content with German and Russian text:
```javascript
PrimeFacesExt.locales.TimePicker['de'] = {
hourText: 'Stunden',
minuteText: 'Minuten',
amPmText: ['AM', 'PM'] ,
closeButtonText: 'Schließen',
nowButtonText: 'Akt. Uhrzeit',
deselectButtonText: 'Entmarkieren'
};
PrimeFacesExt.locales.TimePicker['ru'] = {
hourText: 'Часы',
minuteText: 'Минуты',
amPmText: ['AM', 'PM'] ,
closeButtonText: 'Закрыть',
nowButtonText: 'Тeкущee врeмя',
deselectButtonText: 'Очистить'
};
* English
```javascript
PrimeFacesExt.locales.Timeline['en'] = {
'MONTHS': ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
'MONTHS_SHORT': ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
'DAYS': ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
'DAYS_SHORT': ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
'ZOOM_IN': "Zoom in",
'ZOOM_OUT': "Zoom out",
'MOVE_LEFT': "Move left",
'MOVE_RIGHT': "Move right",
'NEW': "New",
'CREATE_NEW_EVENT': "Create new event"
};
```
* French
```javascript
PrimeFacesExt.locales.Timeline['fr'] = {
'MONTHS': ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
'MONTHS_SHORT': ["Jan", "Fev", "Mar", "Avr", "Mai", "Jun", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"],
'DAYS': ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"],
'DAYS_SHORT': ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"],
'ZOOM_IN': "Zoomer",
'ZOOM_OUT': "Dézoomer",
'MOVE_LEFT': "Déplacer à gauche",
'MOVE_RIGHT': "Déplacer à droite",
'NEW': "Nouveau",
'CREATE_NEW_EVENT': "Créer un nouvel évènement"
};
```
* German
```javascript
PrimeFacesExt.locales.Timeline['de'] = {
'MONTHS': ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
'MONTHS_SHORT': ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
'DAYS': ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
'DAYS_SHORT': ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"],
'ZOOM_IN': "Vergrößern",
'ZOOM_OUT': "Verkleinern",
'MOVE_LEFT': "Nach links verschieben",
'MOVE_RIGHT': "Nach rechts verschieben",
'NEW': "Neu",
'CREATE_NEW_EVENT': "Neues Ereignis erzeugen"
};
```
* Catalan
```javascript
PrimeFacesExt.locales.Timeline['ca'] = {
'MONTHS': ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Setembre", "Octubre", "Novembre", "Desembre"],
'MONTHS_SHORT': ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"],
'DAYS': ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"],
'DAYS_SHORT': ["Dm.", "Dl.", "Dm.", "Dc.", "Dj.", "Dv.", "Ds."],
'ZOOM_IN': "Augmentar zoom",
'ZOOM_OUT': "Disminuir zoom",
'MOVE_LEFT': "Moure esquerra",
'MOVE_RIGHT': "Moure dreta",
'NEW': "Nou",
'CREATE_NEW_EVENT': "Crear nou event"
};
```
* Russian
```javascript
PrimeFacesExt.locales.Timeline['ru'] = {
'MONTHS': ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
'MONTHS_SHORT': ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
'DAYS': ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
'DAYS_SHORT': ["Вос", "Пон", "Втo", "Срe", "Чет", "Пят", "Суб"],
'ZOOM_IN': "Увeличить",
'ZOOM_OUT': "Умeньшить",
'MOVE_LEFT': "Сдвинуть налeво",
'MOVE_RIGHT': "Сдвинуть направо",
'NEW': "Новый",
'CREATE_NEW_EVENT': "Создать новоe событиe"
};
```
* Spanish
```javascript
PrimeFacesExt.locales.Timeline['es'] = {
'MONTHS': ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
'MONTHS_SHORT': ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
'DAYS': ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
'DAYS_SHORT': ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"],
'ZOOM_IN': "Aumentar zoom",
'ZOOM_OUT': "Disminuir zoom",
'MOVE_LEFT': "Mover izquierda",
'MOVE_RIGHT': "Mover derecha",
'NEW': "Nuevo",
'CREATE_NEW_EVENT': "Crear nuevo evento"
};
```
* Portuguese (Brasil)
```javascript
PrimeFacesExt.locales.Timeline['pt_BR'] = {
'MONTHS': ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
'MONTHS_SHORT': ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
'DAYS': ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"],
'DAYS_SHORT': ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
'ZOOM_IN': "Aumentar zoom",
'ZOOM_OUT': "Diminuir zoom",
'MOVE_LEFT': "Mover esquerda",
'MOVE_RIGHT': "Mover direita",
'NEW': "Novo",
'CREATE_NEW_EVENT': "Criar novo evento"
};
```
* Italian
```javascript
PrimeFacesExt.locales.Timeline['it'] = {
'MONTHS': ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
'MONTHS_SHORT': ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"],
'DAYS': ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"],
'DAYS_SHORT': ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
'ZOOM_IN': "Aumentare lo zoom",
'ZOOM_OUT': "Diminuire lo zoom",
'MOVE_LEFT': "Muovere a sinistra",
'MOVE_RIGHT': "Muovere a destra",
'NEW': "Nuovo",
'CREATE_NEW_EVENT': "Creare nuovo evento"
};
```
* Finnish
```javascript
PrimeFacesExt.locales.Timeline['fi'] = {
'MONTHS': ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"],
'MONTHS_SHORT': ["Tam", "Hel", "Maa", "Huh", "Tou", "Kes", "Hei", "Elo", "Syy", "Lok", "Mar", "Jou"],
'DAYS': ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"],
'DAYS_SHORT': ["Sun", "Maa", "Tii", "Kes", "Tor", "Per", "Lau"],
'ZOOM_IN': "Zoomaa lähemmäs",
'ZOOM_OUT': "Zoomaa kauemmas",
'MOVE_LEFT': "Siirry vasemmalle",
'MOVE_RIGHT': "Siirry oikealle",
'NEW': "Uusi",
'CREATE_NEW_EVENT': "Luo uusi tapahtuma"
};
```
* Dutch
```javascript
PrimeFacesExt.locales.Timeline['nl'] = {
'MONTHS': ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
'MONTHS_SHORT': ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
'DAYS': ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"],
'DAYS_SHORT': ["zo", "ma", "di", "wo", "do", "vr", "za"],
'ZOOM_IN': "Inzoomen",
'ZOOM_OUT': "Uitzoomen",
'MOVE_LEFT': "Naar links",
'MOVE_RIGHT': "Naar rechts",
'NEW': "Nieuw",
'CREATE_NEW_EVENT': "Nieuwe gebeurtenis maken"
};
```
PrimeFacesExt.locales.TimePicker['de_DE'] = PrimeFacesExt.locales.TimePicker['de']; PrimeFacesExt.locales.TimePicker['de_CH'] = PrimeFacesExt.locales.TimePicker['de'];
Following locales with corresponding text are defined currently. Please create an issue ticket and provide localized text if you want to share more locales with community. Thanks!
<h2 id="timepicker">TimePicker component</h2>
* English
```javascript
PrimeFacesExt.locales.TimePicker['en'] = {
hourText: 'Hours',
minuteText: 'Minutes',
amPmText: ['AM', 'PM'] ,
closeButtonText: 'Done',
nowButtonText: 'Now',
deselectButtonText: 'Deselect'
};
- German
PrimeFacesExt.locales.TimePicker['de'] = {
hourText: 'Stunden',
minuteText: 'Minuten',
amPmText: ['AM', 'PM'] ,
closeButtonText: 'Schließen',
nowButtonText: 'Akt. Uhrzeit',
deselectButtonText: 'Entmarkieren'
};
- Russian
PrimeFacesExt.locales.TimePicker['ru'] = {
hourText: 'Часы',
minuteText: 'Минуты',
amPmText: ['AM', 'PM'] ,
closeButtonText: 'Закрыть',
nowButtonText: 'Тeкущee врeмя',
deselectButtonText: 'Очистить'
};
- Czech
PrimeFacesExt.locales.TimePicker['cs'] = {
hourText: 'Hodiny',
minuteText: 'Minuty',
amPmText: ['AM', 'PM'] ,
closeButtonText: 'Zavřít',
nowButtonText: 'Nyní',
deselectButtonText: 'Odoznačit'
};
- Dutch (Nederlands)
PrimeFacesExt.locales.TimePicker['nl'] = {
hourText: 'Uren',
minuteText: 'Minuten',
amPmText: ['AM', 'PM'],
closeButtonText: 'Sluiten',
nowButtonText: 'Actuele tijd',
deselectButtonText: 'Wissen'
};
- French
PrimeFacesExt.locales.TimePicker['fr'] = {
hourText: 'Heures',
minuteText: 'Minutes',
amPmText: ['AM', 'PM'],
closeButtonText: 'Fermer',
nowButtonText: 'Maintenant',
deselectButtonText: 'Désélectionner'
};
- Italian
PrimeFacesExt.locales.TimePicker['it'] = {
hourText: 'Ore',
minuteText: 'Minuti',
amPmText: ['AM', 'PM'],
closeButtonText: 'Chiudi',
nowButtonText: 'Adesso',
deselectButtonText: 'Svuota'
};
- Japanese
PrimeFacesExt.locales.TimePicker['ja'] = {
hourText: '時間',
minuteText: '分',
amPmText: ['午前', '午後'],
closeButtonText: '閉じる',
nowButtonText: '現時',
deselectButtonText: '選択解除'
};
- Polish
PrimeFacesExt.locales.TimePicker['pl'] = {
hourText: 'Godziny',
minuteText: 'Minuty',
amPmText: ['AM', 'PM'],
closeButtonText: 'Zamknij',
nowButtonText: 'Teraz',
deselectButtonText: 'Odznacz'
};
- Slovenian
PrimeFacesExt.locales.TimePicker['sl'] = {
hourText: 'Ure',
minuteText: 'Minute',
amPmText: ['AM', 'PM'],
closeButtonText: 'Zapri',
nowButtonText: 'Zdaj',
deselectButtonText: 'Pobriši'
};
- Spanish
PrimeFacesExt.locales.TimePicker['es'] = {
hourText: 'Hora',
minuteText: 'Minuto',
amPmText: ['AM', 'PM'],
closeButtonText: 'Hecho',
nowButtonText: 'Ahora',
deselectButtonText: 'Deseleccionar'
};
- Portuguese (Brasil)
PrimeFacesExt.locales.TimePicker['pt_BR'] = {
hourText: 'Horas',
minuteText: 'Minutos',
amPmText: ['AM', 'PM'],
closeButtonText: 'Fechar',
nowButtonText: 'Agora',
deselectButtonText: 'Limpar seleção'
};