|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uic.helpers.Translator
Dummy class for translating strings in the GUI to do localisation.
| Constructor Summary | |
Translator()
|
|
| 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 Translator()
| Method Detail |
public String translate(String in)
The 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.
public String getButtonText(String in)
An extending class would call this method _after_ it has done the actual translation of the string.
public String getMnemonic(String in)
An extending class would call this method _after_ it has done the actual translation of the string.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||