Package com.jalios.util
Class LangProperty
- java.lang.Object
-
- com.jalios.util.LangProperty
-
public class LangProperty extends java.lang.Object
This class allow one to instanciate a property to be used at a later time in a localized message. Useful for nested property, use it as an another property argument for example. Example: With a properties file like this one:en.en: English en.fr: French en.lbl.myfield: My field numbered {0} en.msg.empty-field-ml: Field {0} must not be empty in {1}. fr.en: Anglais fr.fr: Français fr.lbl.myfield: Mon champ numéroté {0} fr.msg.empty-field-ml: Le champ {0} ne doit pas être vide en {1}.
This code:String fieldName = "myfield"; String missingFieldLang = "fr"; JcmsUtil.glp(userLang, "msg.empty-field-ml", new LangProperty(fieldName, new Integer(42)), new LangProperty(missingFieldLang));
Would output those messages :- in english : Field My field numbered 42 must not be empty in French.
- in french : Le champ Mon champ numéroté 42 ne doit pas être vide en Français.
- Since:
- jcms-5.5.0
- Author:
- Olivier Jaquemet
-
-
Constructor Summary
Constructors Constructor Description LangProperty(java.lang.String name)
LangProperty(java.lang.String name, java.lang.Object arg1)
LangProperty(java.lang.String name, java.lang.Object[] arguments)
LangProperty(java.lang.String name, java.lang.Object arg1, java.lang.Object arg2)
LangProperty(java.lang.String name, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]
getArguments()
java.lang.String
getName()
-
-
-
Constructor Detail
-
LangProperty
public LangProperty(java.lang.String name, java.lang.Object[] arguments)
-
LangProperty
public LangProperty(java.lang.String name)
-
LangProperty
public LangProperty(java.lang.String name, java.lang.Object arg1)
-
LangProperty
public LangProperty(java.lang.String name, java.lang.Object arg1, java.lang.Object arg2)
-
LangProperty
public LangProperty(java.lang.String name, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
-
-