Get Transliterators available source ids

Problem:

You want to retireve all available source ids for a Transliterator.

Solution:

A Transliterator is created using a combination of a source and a target id joined by a hyphen. 

To get a list of all sources:

//Get an Enumeration of available source ids
Enumeration<String> ids = Transliterator.getAvailableSources();
//Loop through available ids and output them to the console
while(ids.hasMoreElements()){
    String id = ids.nextElement();
    System.out.println(id);
}

 


The output:

Arabic
Hangul
Tamil
Thaana
Gujarati
Simplified
Han
Telugu
Syriac
Devanagari
Name
Publishing
Digit
Latin
Kannada
NumericPinyin
Jamo
Any
Fullwidth
Cyrillic
Armenian
Georgian
Katakana
Hex
Malayalam
Oriya
Pinyin
Tone
Thai
Greek
Hiragana
Halfwidth
Hebrew
Accents
Traditional
Bengali
Gurmukhi