Sun JSF 1.1 or MyFaces Custom Validator Messages.

Hello i must use JSF 1.1 version for some old project. The problem is that NOW i must use localization and internationalization API to make it "good" in my own language - Bulgarian ( Cyrilic language)

The problem is that input components for 1.1 doesnt have attribute "label" i have defined in my resource bundle file the keys for standart validators such as this for example:

javax.faces.component.UIInput.REQUIRED={0} \u041F\u043E\u043B\u0435\u0442\u043E \u0435 \u0437\u0430\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E

but the {0} parameter is aways - null ( and is not showed ) or is equal to the ID of the component which is English (ASCII) and it is not usable .. becouse it is ugly .

Can i make not so user friendly think like label but Something ?

can i pass some value to the validator ? ( which can be unicode )

Message was edited by:

JOKe

[916 byte] By [JOKea] at [2007-11-26 23:54:18]
# 1
Hello, Even i have come across this pbm. I'm using myFaces.1.1.4.jar By that i using custom validators and i'm getting the error messsages , in way i wanna.
Roshu_Roshua at 2007-7-11 15:36:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
so you'r saying that there is no standart way for localization/internationalization of Custom/Validator messages for JSF 1.1
JOKea at 2007-7-11 15:36:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

part of faces-config.xml:

<application>

<message-bundle>com....resources.Messages</message-bundle>

<locale-config>

<default-locale>de_DE</locale-locale>

<supported-locale>en_GB</supported-locale>

</locale-config>

</application>

This works for us.

Ingmara at 2007-7-11 15:36:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

yeah it works for this 2 locales.

but doesnt work for Validator Messages becouse the component name which is in the "error message " is coresponding to the "id" of the element which is aways English locale never for exampel in German when you use some strange simbol non US symbol for label or for some field i can't show the field name in summary massage list

JOKea at 2007-7-11 15:36:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

You may want to try using the Apache Shale Validation framework. It incorporates the use of the Common Validator framework. Although you still can't pass an argument for required. For all the other validators you can. I guess you could write a customer required validator that takes argument(s). http://shale.apache.org/shale-validator/index.html

kyle.bobera at 2007-7-11 15:36:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...