org.extex.framework.i18n
Interface Localizer

All Superinterfaces:
java.io.Serializable

public interface Localizer
extends java.io.Serializable

The localizer is a convenience class which joins the features of a resource bundle with the features of a message formatter.

Version:
$Revision: 6802 $
Author:
Gerd Neugebauer

Method Summary
 java.lang.String format(java.lang.String key)
          Getter for the value of a format string associated to a given key.
 java.lang.String format(java.lang.String fmt, java.lang.Object a)
          Apply the given argument to the format string stored in the resource bundle under the given key.
 java.lang.String format(java.lang.String fmt, java.lang.Object[] a)
          Apply the given argument to the format string stored in the resource bundle under the given key.
 java.lang.String format(java.lang.String fmt, java.lang.Object a, java.lang.Object b)
          Apply the given argument to the format string stored in the resource bundle under the given key.
 java.lang.String format(java.lang.String fmt, java.lang.Object a, java.lang.Object b, java.lang.Object c)
          Apply the given argument to the format string stored in the resource bundle under the given key.
 java.lang.String format(java.lang.String fmt, java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d)
          Apply the given argument to the format string stored in the resource bundle under the given key.
 java.lang.String format(java.lang.String fmt, java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d, java.lang.Object e)
          Apply the given argument to the format string stored in the resource bundle under the given key.
 java.lang.String getFormat(java.lang.String key)
          Getter for the value of a format string associated to a given key.
 void message(java.io.PrintStream writer, java.lang.String fmt)
          Get the value of a format string associated to a given key in the resource bundle and print it to the given writer.
 void message(java.io.PrintStream writer, java.lang.String fmt, java.lang.Object a)
          Apply the given argument to the format string stored in the resource bundle under the given key and print the result to a writer.
 void message(java.io.PrintStream writer, java.lang.String fmt, java.lang.Object a, java.lang.Object b)
          Apply the given argument to the format string stored in the resource bundle under the given key and print the result to a writer.
 void message(java.io.PrintStream writer, java.lang.String fmt, java.lang.Object a, java.lang.Object b, java.lang.Object c)
          Apply the given argument to the format string stored in the resource bundle under the given key and print the result to a writer.
 

Method Detail

format

java.lang.String format(java.lang.String key)
Getter for the value of a format string associated to a given key.

Parameters:
key - the key in the resource bundle to search for
Returns:
the resource string or the String ???key??? if none is found

format

java.lang.String format(java.lang.String fmt,
                        java.lang.Object a)
Apply the given argument to the format string stored in the resource bundle under the given key. The argument object's value of toString() replaces the sub-string '{0}' in the format.

Parameters:
fmt - the key in the resource bundle to search for
a - the Object used for the sub-string {0}
Returns:
the expanded format string

format

java.lang.String format(java.lang.String fmt,
                        java.lang.Object a,
                        java.lang.Object b)
Apply the given argument to the format string stored in the resource bundle under the given key. The argument object's value of toString() replaces the sub-string '{0}' and '{1}' in the format.

Parameters:
fmt - the key in the resource bundle to search for
a - the Object used for the sub-string {0}
b - the Object used for the sub-string {1}
Returns:
the expanded format string

format

java.lang.String format(java.lang.String fmt,
                        java.lang.Object a,
                        java.lang.Object b,
                        java.lang.Object c)
Apply the given argument to the format string stored in the resource bundle under the given key. The argument object's value of toString() replaces the sub-string '{0}','{1}', and '{2}' in the format.

Parameters:
fmt - the key in the resource bundle to search for
a - the Object used for the sub-string {0}
b - the Object used for the sub-string {1}
c - the Object used for the sub-string {2}
Returns:
the expanded format string

format

java.lang.String format(java.lang.String fmt,
                        java.lang.Object a,
                        java.lang.Object b,
                        java.lang.Object c,
                        java.lang.Object d)
Apply the given argument to the format string stored in the resource bundle under the given key. The argument object's value of toString() replaces the sub-string '{0}','{1}','{2}', and '{3}' in the format.

Parameters:
fmt - the key in the resource bundle to search for
a - the Object used for the sub-string {0}
b - the Object used for the sub-string {1}
c - the Object used for the sub-string {2}
d - the Object used for the sub-string {3}
Returns:
the expanded format string

format

java.lang.String format(java.lang.String fmt,
                        java.lang.Object a,
                        java.lang.Object b,
                        java.lang.Object c,
                        java.lang.Object d,
                        java.lang.Object e)
Apply the given argument to the format string stored in the resource bundle under the given key. The argument object's value of toString() replaces the sub-string '{0}','{1}','{2}', and '{3}' in the format.

Parameters:
fmt - the key in the resource bundle to search for
a - the Object used for the sub-string {0}
b - the Object used for the sub-string {1}
c - the Object used for the sub-string {2}
d - the Object used for the sub-string {3}
e - the Object used for the sub-string {4}
Returns:
the expanded format string

format

java.lang.String format(java.lang.String fmt,
                        java.lang.Object[] a)
Apply the given argument to the format string stored in the resource bundle under the given key. The argument object's value of toString() replaces the substring '{0}','{1}','{2}', and so on in the format.

Parameters:
fmt - the key in the resource bundle to search for
a - the Object used for the substrings {n}
Returns:
the expanded format string

getFormat

java.lang.String getFormat(java.lang.String key)
Getter for the value of a format string associated to a given key.

Parameters:
key - the key in the resource bundle to search for
Returns:
the resource string or null

message

void message(java.io.PrintStream writer,
             java.lang.String fmt)
Get the value of a format string associated to a given key in the resource bundle and print it to the given writer.

Parameters:
writer - the target output writer
fmt - the key in the resource bundle to search for

message

void message(java.io.PrintStream writer,
             java.lang.String fmt,
             java.lang.Object a)
Apply the given argument to the format string stored in the resource bundle under the given key and print the result to a writer. The argument object's value of toString() replaces the sub-string '{0}' in the format.

Parameters:
writer - the target output writer
fmt - the key in the resource bundle to search for
a - the Object used for the substring {0}

message

void message(java.io.PrintStream writer,
             java.lang.String fmt,
             java.lang.Object a,
             java.lang.Object b)
Apply the given argument to the format string stored in the resource bundle under the given key and print the result to a writer. The argument object's value of toString() replaces the sub-string '{0}' and '{1}' in the format.

Parameters:
writer - the target output writer
fmt - the key in the resource bundle to search for
a - the Object used for the substring {0}
b - the Object used for the substring {1}

message

void message(java.io.PrintStream writer,
             java.lang.String fmt,
             java.lang.Object a,
             java.lang.Object b,
             java.lang.Object c)
Apply the given argument to the format string stored in the resource bundle under the given key and print the result to a writer. The argument object's value of toString() replaces the sub-string '{0}', '{1}', and '{2}' in the format.

Parameters:
writer - the target output writer
fmt - the key in the resource bundle to search for
a - the Object used for the sub-string {0}
b - the Object used for the sub-string {1}
c - the Object used for the sub-string {2}