org.aspsimon.termcomp.infrastructure.utility
Class I18NHelper

java.lang.Object
  extended by org.aspsimon.termcomp.infrastructure.utility.I18NHelper

public class I18NHelper
extends java.lang.Object


Constructor Summary
I18NHelper()
           
 
Method Summary
static java.lang.String normalizeString(java.lang.String i18nString)
          Return a non-internationalized representation of the input.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18NHelper

public I18NHelper()
Method Detail

normalizeString

public static java.lang.String normalizeString(java.lang.String i18nString)
Return a non-internationalized representation of the input. Punctuation is converted to a hyphen ('-'). spaces are replaced by '_' and the whole string is set to lower case. Then, German umlauts (ä, ö, ü) are converted to 'ae', 'oe' and 'ue' respectively, after which the CharsetEncoder throws out any symbols not left in US-ASCII.

Parameters:
i18nString - Internationalized String in UTF-8 which should be normalized.
Returns:
The normalized representation of the input String.