Theme
arya
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga
vela
LocaleConverter
The LocaleConverter (pe:convertLocale) converts a locale string (for example 'de_DE') to a java.util.Locale object and reverse.
Enter a new locale here (A valid locale for example is de_DE):
Available locales:
Source

<p:messages id="messages"/>

Enter a new locale here (A valid locale for example is de_DE):<br/>
<p:inputText id="enteredLocale" value="#{localeController.enteredLocale}" required="true">
    <pe:convertLocale/>
</p:inputText>

<h:panelGroup layout="block" style="margin-top: 10px;margin-bottom: 10px;">
    <p:commandButton value="Add" action="#{localeController.add}" update="messages addedLocales enteredLocale"/>
</h:panelGroup>

Available locales:<br/>
<h:selectManyListbox id="addedLocales" value="#{localeController.selectedLocales}" style="width: 200px;">
    <pe:convertLocale/>
    <f:selectItems value="#{localeController.addedLocales}"/>
</h:selectManyListbox>
            
Components and more
Documentation pe:convertLocale
Attributes (move mouse over the names to see data types)
Name Description
separator Character which will be used to separate the country and language. Default is '_'.
PrimeFaces Extensions Showcase - © 2011-2023,PrimeFaces: 14.0.5,PrimeFaces Extensions: 14.0.5,JSF: Apache MyFaces JSF-2.3 Core Impl 2.3.10,Server: jetty/9.4.36.v20210114,Build time: 2024-09-10 21:01