|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uic.helpers.Translator
|
+--uic.helpers.UICTranslator
| Constructor Summary | |
UICTranslator()
|
|
| Method Summary | |
String |
getButtonText(String in)
In Qt the '&' in front of a character represents a mnemonic; but should not be visible on buttons; this method returns the string sans the '&'. |
String |
getMnemonic(String in)
In Qt the '&' in front of a character represents a mnemonic; but should not be visible on buttons; this method returns the first character that follows the '& char. |
String |
translate(String in)
This is a simple implementation to do translation (i18n) of the input string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UICTranslator()
| Method Detail |
public String translate(String in)
TranslatorThe usage of this method (in extending classes) would be to translate text from the user-interface input file to the output. A simple example is that the implementation of this method will translate 'back' to 'terug' since my dictionairy says that that is the translation for my locale.
Most i18n implementions have a slightly more intelligent localisation and do the
translation of strings at runtime. A call to something like
StaticTranslator.translateString(in)
seems more appropriate.
translate in class Translatorpublic String getButtonText(String in)
TranslatorAn extending class would call this method _after_ it has done the actual translation of the string.
getButtonText in class Translatorpublic String getMnemonic(String in)
TranslatorAn extending class would call this method _after_ it has done the actual translation of the string.
getMnemonic in class Translator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||