All the steps in the tutorial are not really needed.
What I did (And it works) is:
1. In loging.xhtm, for instance:
<f:view locale="#{languageDetails.locale}" >
<head>
.....
<f:loadBundle basename="messages.Messages" var="msg1"/>
.....
<f:view>
<h:form>
<h:panelGrid columns="2">
<h:outputText value="Select Language"></h:outputText>
<h:selectOneMenu id="dropdown" value="#{languageDetails.locale}">
<f:selectItem itemValue="en" itemLabel="English" />
<f:selectItem itemValue="es" itemLabel="Spanish" />
<f:selectItem itemValue="de" itemLabel="German" />
</h:selectOneMenu>
</h:panelGrid>
<p><h:commandButton id="change" value="Change Language"
action="#{languageDetails.changeLanguage}" /></p>
</h:form>
</f:view>
</body>
</f:view>
2.In java source code I also made some changes:
public class LanguageDetails {
private static String locale = Locale.getDefault().getDisplayLanguage();
public void setLocale(String locale1) {
this.locale = locale1;
}
public synchronized String getLocale() {
return locale;
}
public synchronized String changeLanguage() {
return "changed";
}
}
And that's all.
Hope this could help