Foros de discusión
localization
Boudewijn van weert, modificado hace 16 años.
localization
New Member Mensajes: 7 Fecha de incorporación: 22/10/07 Mensajes recientes
Hello,
I'm facing a localization problem: sometimes a value of a resourcebundle is not found.
I'm using liferay 4.3.3, icefaces portlet, facelets.
This problem only occurs on a linux machine, not on liferay on windows nor when I deploy the portlet as an application.
The initial screen gets displayed correctly, which means that the resource bundle was found. But when I do some action, I get the following error:
I'm not sure if this is a liferay or an icefaces problem.
Does anybody have any clue?
Regards,
Bo
I'm facing a localization problem: sometimes a value of a resourcebundle is not found.
I'm using liferay 4.3.3, icefaces portlet, facelets.
This problem only occurs on a linux machine, not on liferay on windows nor when I deploy the portlet as an application.
The initial screen gets displayed correctly, which means that the resource bundle was found. But when I do some action, I get the following error:
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key name
java.util.ResourceBundle.getObject(ResourceBundle.java:386)
com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap.get(LoadBundleHandler.java:122)
com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
com.sun.el.parser.AstValue.getValue(AstValue.java:96)
com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
javax.faces.component.UIOutput.getValue(UIOutput.java:167)
com.icesoft.faces.renderkit.dom_html_basic.DomBasicInputRenderer.getValue(DomBasicInputRenderer.java:60)
com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.getValue(DomBasicRenderer.java:153)
com.icesoft.faces.renderkit.dom_html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:108)
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:703)
com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:349)
com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:196)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:585)
I'm not sure if this is a liferay or an icefaces problem.
Does anybody have any clue?
Regards,
Bo
Björn Ryding, modificado hace 16 años.
RE: localization
Liferay Master Mensajes: 582 Fecha de incorporación: 16/05/07 Mensajes recientes
When a resource is found on Windows and not on Linux, the issue is often the use of capital letters.
On Windows:
Resource_fr_FR.properties == Resource_fr_fr.properties
On Linux
Resource_fr_FR.properties != Resource_fr_fr.properties
On Windows:
Resource_fr_FR.properties == Resource_fr_fr.properties
On Linux
Resource_fr_FR.properties != Resource_fr_fr.properties
Boudewijn van weert, modificado hace 16 años.
RE: localization
New Member Mensajes: 7 Fecha de incorporación: 22/10/07 Mensajes recientes
Hello,
My file is called Messages_es.properties, and loadBundle refers to "Messages", so I think that's ok. Also, the first time the screen is loaded correctly, so the bundle CAN be found...
Cheers
My file is called Messages_es.properties, and loadBundle refers to "Messages", so I think that's ok. Also, the first time the screen is loaded correctly, so the bundle CAN be found...
Cheers
Narmada V, modificado hace 11 años.
RE: localization
Junior Member Mensajes: 37 Fecha de incorporación: 14/05/12 Mensajes recientes
i too got the same exception. I think this is thrown from liferay.
i got this exception when the value of "res.getString("*************")" given in the jsp page doesnot match the value given in the resource bundle file.
When i have corrected the spell, i dint get the exception.
i got this exception when the value of "res.getString("*************")" given in the jsp page doesnot match the value given in the resource bundle file.
When i have corrected the spell, i dint get the exception.
Hitoshi Ozawa, modificado hace 11 años.
RE: localization
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
I agree with Narmada. You've said "sometimes a value of a resourcebundle is not found" and not "always".
This most likely means your key in the property file is not matching with your key in your code. Check they are exactly the same including upper/lower case.
This most likely means your key in the property file is not matching with your key in your code. Check they are exactly the same including upper/lower case.