Package com.xmlmind.util
Class Localizer
- java.lang.Object
-
- com.xmlmind.util.Localizer
-
public final class Localizer extends Object
Helper class used to create localized, formatted, messages.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringmsg(String id)Returns localized message having specified ID.Stringmsg(String id, Object... args)Returns localized message having specified ID and formatted using specified arguments.
-
-
-
Constructor Detail
-
Localizer
public Localizer(Class<?> cls)
Constructs a Localizer which usesjava.text.MessageFormats found inpackage_name.Messages_locale.propertiesjava.util.ResourceBundles to create its localized, formatted, messages.Example:
com.xmlmind.foo.Messages_fr.properties, which is used to create localized, formatted, messages for all classes in thecom.xmlmind.foopackage, contains 2 message formats havingcannotOpenandcannotSaveas their IDs.cannotOpen=Ne peut ouvrir le fichier "{0}":\n{1} cannotSave=Ne peut enregistrer le fichier "{0}":\n{1}- Parameters:
cls- Class used to specify package_name.
-
-