Hellos, all the information an pieces of code which follows, is what I am using.
Hello, I am trying to internationalizate a web applicacion. For that, I set up:
application-context.xml
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="msg" />
<property name="cacheSeconds" value="0" />
</bean>
faces-config.xml
....
<application>
<locale-config>
<default-locale>en_EN</default-locale>
<supported-locale>en_EN</supported-locale>
<supported-locale>fr_FR</supported-locale>
<supported-locale>de_DE</supported-locale>
<supported-locale>es_ES</supported-locale>
</locale-config>
<resource-bundle>
<base-name>javabeat.net.messages.Messages</base-name>
<var>msg</var>
</resource-bundle>
</application>
......
<managed-bean>
<managed-bean-name>msg</managed-bean-name>
<managed-bean-class>org.springframework.context.support.ReloadableResourceBundleMessageSource</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean
>
Messages.bundle which is in /WEB-INF/messages. I think maybe the error is here, in the basename, maybe I must write a hole path, but I am nor sure about this and tryed different options with no
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<f:loadBundle basename="javabeat.net.messages.Messages" var="msg"/>
<html>
<body>
<f:view>
<h:form>
<h:outputText value="#{msg.email}"/>
</h:form>
</f:view>
</body>
</html>
Severals MessagesBundle_es_ES.properties in different languajes which are also in /WEB-INF/messages
email=Dirección de correo electrónico
And in my code, in a loggin.xhtml for instance, I have something like this:
<h:outputText value="#{msg.email}"/>
But I don't get any result when I display the page. What am I doing wrong'? Thansk in advance