I developed a really basic transliterator in java with the icu library. It is working fine for most cases. as transliterationRule I tried e.g "Any-Latin", "Any-Cyrillic", "Any-Arabic", "Any-Greek". Those are working fine. But I really can't figure out how to transliterate into Chinese charakters.
I research a lot but none of the suggestions work. I tried "Any-Hant", "Any-Chinese", "Any-zh_Hans". Is there somebody who knows what language code I can use? I'm quite new to ICU / CLDR
Here is my code:
import com.ibm.icu.text.Transliterator; public class Transliteration { private final String input ; private final String transliterationRule; public Transliteration(String input, String transliterationRule) { this.input = input; this.transliterationRule = transliterationRule; } public String getTransliteration(){ Transliterator transliterator = Transliterator.getInstance(this.transliterationRule); return transliterator.transliterate(this.input); } public String getInput(){ return input; } public String getTransliterationRule(){ return transliterationRule; } Thank you!