-
Notifications
You must be signed in to change notification settings - Fork 22
PrimeFaces Extensions Locales
ova2 edited this page Apr 2, 2013
·
17 revisions
Components like TimePicker uses 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: 'Очистить'
};
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'
};
- 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'
};
```javascript
* Italian
PrimeFacesExt.locales.TimePicker['it'] = { hourText: 'Ore', minuteText: 'Minuti', amPmText: ['AM', 'PM'], closeButtonText: 'Chiudi', nowButtonText: 'Adesso', deselectButtonText: 'Svuota' };
* Japanese
```javascript
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'
};