org.robokind.api.common.localization
Class LanguageLocale

java.lang.Object
  extended by org.robokind.api.common.localization.LanguageLocale

public class LanguageLocale
extends Object

A class for localizing String to a certain language.

Author:
Matthew Stevenson

Constructor Summary
LanguageLocale(String locale, String abrv, Map<String,String> dictionary)
          Creates a new LanguageLocale.
 
Method Summary
 String get(String key)
          Returns the localized value of the given key.
 String getAbbreviation()
          Returns the abbreviation of the language.
 String getLocale()
          Returns the name of the LanguageLocale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageLocale

public LanguageLocale(String locale,
                      String abrv,
                      Map<String,String> dictionary)
Creates a new LanguageLocale.

Parameters:
locale - name of the locale
abrv - language abbreviation
dictionary - language localization dictionary
Method Detail

getLocale

public String getLocale()
Returns the name of the LanguageLocale.

Returns:
name of the LanguageLocale

getAbbreviation

public String getAbbreviation()
Returns the abbreviation of the language.

Returns:
abbreviation of the language

get

public String get(String key)
Returns the localized value of the given key.

Parameters:
key - String to localize
Returns:
localized value of the given key


Copyright © 2011-2013. All Rights Reserved.