fi.karppinen.xml
Class LangUtil

java.lang.Object
  extended by fi.karppinen.xml.LangUtil

public class LangUtil
extends Object

Converts between Locale and XML-compatible language codes.

Version:
$Id: LangUtil.java,v 1.1 2006/10/30 19:57:09 hsivonen Exp $
Author:
hsivonen

Constructor Summary
LangUtil()
           
 
Method Summary
static Locale codeToLocale(String code)
          Converts between XML-compatible language codes and Locale.
static String localeToCode(Locale loc)
          Converts between Locale and XML-compatible language codes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LangUtil

public LangUtil()
Method Detail

codeToLocale

public static Locale codeToLocale(String code)
Converts between XML-compatible language codes and Locale.

Parameters:
code - the language code
Returns:
the corresponding locale

localeToCode

public static String localeToCode(Locale loc)
Converts between Locale and XML-compatible language codes.

Parameters:
loc - the locale
Returns:
the language code