The i18n Cookbook - recipies for a global society

  • java cookbook
  • about the author
Home

Java Cookbook

  • Java Internationalization Cookbook

transliterator

Convert text from one script to another

Problem:

You want to convert the script text is written in.

Solution:

The Transliterator from icu4j class allows for easy conversion of text from one writing system to another.  To transliterate text you simply get an instance of the Transliterator class using the id of the writing system you are converting from, and the id of the system you want to convert into, and then call the transliterate method on the object.

 

  • Java
  • transliterate
  • transliterator
  • Add new comment
  • Read more

Get available target ids for a Transliterator source id

Problem:

You have a source id but you want to retrieve all available target ids for the source id.

Solution:

A Transliterator is retrieved using an id that is a combination of a source and target id.

 

  • Java
  • transliterator
  • Add new comment
  • Read more

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:

  • Java
  • transliterator
  • Add new comment
  • Read more

Get all available transliterator ids

Problem:

You want to get all available transliterator ids.

Solution:

You obtain a Transliterator by specifying an id.  The id is a String that contains two script names separated by a hyphen, for example: "Latin-Hangul."

 

To obtain a list of all ids:

  • Java
  • transliteration
  • transliterator
  • Add new comment
  • Read more

If you are testing any of these recipes in Eclipse and the characters are not displaying correctly in your console visit http://i18ncookbook.com/eclipse_settings.

This site is ad supported.  I hope you find something among our sponsors worth clicking. ;)

i18n search

Google
Custom Search
Syndicate content

Search

Tags in Tags

calendar date icu4j Java Locale number format numberformat parse spellout timezone transliteration transliterator
more tags

User login

  • Create new account
  • Request new password
  • java cookbook
  • about the author