uic
Interface TranslationInterface

All Known Implementing Classes:
Translate, Translate

public interface TranslationInterface

Any translations framework that implements this interface can work with the generated classes from UIC. All classes generated by the UICompiler framework will automatically have i18n (aka internationalisation) included. The default translator will be good enough for almost all users, but to allow other translations frameworks to be used with minimal effort, the UICompiler translator classes use this interface. Implement this interface on your preferred translator and you are free to return that in the extending class. All you need to do is reimplement the translate() method call.

Since:
1.1

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 '&'.
 char 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 i18n(String in)
          To to internationalisation of a string, you call this method.
 

Method Detail

i18n

public String i18n(String in)
To to internationalisation of a string, you call this method. Note that internationalisation is too long and all the industry has now conformed to the i18n naming (where i18n is a count of characters).

Parameters:
in - the input string you want translated
Returns:
the translated string, or the input when no translation is available.

getButtonText

public 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 '&'.


getMnemonic

public char 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.



Copyright © 2002,2003 Thomas Zander Available under the Free Apache licence