Theme
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-2021,PrimeFaces: 11.0.0,PrimeFaces Extensions: 11.0.0,JSF: Apache MyFaces JSF-2.3 Core API 2.3.9,Server: jetty/9.4.36.v20210114,Build time: 2021-12-10 14:32
occured!