com.azalient.api.i18n
Interface ITranslator


public interface ITranslator

A translator is a utility that stores a list of englishLanguage-freignLanguage pairs of phrases.


Method Summary
 Charset charset()
          Returns the character set used by this foreign language file.
 List<ITranslation> list()
          A list of all the English-foreign phrase pairs
 void localeStr(String lang_country_var)
          Sets the ISO 639-1 locale (for example, fr_FR or zh_CN) that describes the foreign language
 String localeString()
          Returns the ISO 639-1 locale (for example, fr_FR or zh_CN) that describes the foreign language
 void save()
          Save the list of phrase-pairs to a file
 String translation(String english)
          Returns the translation for a given English phrase
 void translation(String englishLanguage, String foreignLanguage)
          Sets the translation for a given English phrase
 

Method Detail

localeStr

void localeStr(String lang_country_var)
Sets the ISO 639-1 locale (for example, fr_FR or zh_CN) that describes the foreign language


localeString

String localeString()
Returns the ISO 639-1 locale (for example, fr_FR or zh_CN) that describes the foreign language


list

List<ITranslation> list()
A list of all the English-foreign phrase pairs


save

void save()
Save the list of phrase-pairs to a file


translation

String translation(String english)
Returns the translation for a given English phrase


translation

void translation(String englishLanguage,
                 String foreignLanguage)
Sets the translation for a given English phrase


charset

Charset charset()
Returns the character set used by this foreign language file. This is important in order to get the correct display of the foreign language words.