org.molgenis.omx.utils
Class I18nTools

java.lang.Object
  extended by org.molgenis.omx.utils.I18nTools

public class I18nTools
extends Object

Reads internationalized strings of the form {"en":"car", "nl":"auto"}

Author:
Dennis

Constructor Summary
I18nTools()
           
 
Method Summary
static String get(String i18nStr)
          If the given string is a internationalized string return the value for the default language, else return the input string
static String get(String i18nStr, String lang)
          If the given string is a internationalized string return the value for the given languange, else return the input string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nTools

public I18nTools()
Method Detail

get

public static String get(String i18nStr)
If the given string is a internationalized string return the value for the default language, else return the input string

Parameters:
i18nStr - internationalized string of the form {"en":"car", "nl":"auto"} or a plain string
Returns:

get

public static String get(String i18nStr,
                         String lang)
If the given string is a internationalized string return the value for the given languange, else return the input string

Parameters:
i18nStr - internationalized string of the form {"en":"car", "nl":"auto"} or a plain string
Returns:


Copyright © 2013. All Rights Reserved.