abbot.i18n
Class Strings

java.lang.Object
  extended byabbot.i18n.Strings

public class Strings
extends Object

Provides i18n support.


Method Summary
static void addBundle(String bundle)
           
static String get(String key)
          Returns the localized String for the given key, or the key surrounded by '#' if no corresponding localized string is found.
static String get(String key, boolean optional)
          Returns the localized string for the given key.
static String get(String key, Object[] args)
          Returns a formatted localized string for the given key and arguments, or the key if no corresponding localized string is found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addBundle

public static void addBundle(String bundle)

get

public static String get(String key)
Returns the localized String for the given key, or the key surrounded by '#' if no corresponding localized string is found.


get

public static String get(String key,
                         boolean optional)
Returns the localized string for the given key. If optional is true, return null, otherwise returns the key surrounded by '#' if no corresponding localized string is found.


get

public static String get(String key,
                         Object[] args)
Returns a formatted localized string for the given key and arguments, or the key if no corresponding localized string is found. Use java.text.MessageFormat syntax for the format string and arguments.



Copyright © 2002-2004 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge