0

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!

2
  • I've not used the transliterations myself, but I see a conceptual problem: All the other scripts you mention are alphabetic scripts (i.e. each character represents a single letter or sounds), but the Chinese Script does not map as cleanly to this, so transliterating from other scripts to Chinese doesn't work the same way. Can you explain what you're trying to achieve? This might be a XY Problem. Commented Jan 4, 2021 at 21:19
  • Hi Joaching, thanks for your reply. It actually might be a xy problem. I want to transliterate adresses in all common scriptures. I'm actually very new to this topic so there is probably some more research to be done. I get your point with the alphabetic scripts Commented Jan 5, 2021 at 10:17

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.