#include <QTrans.h>
QTrans::tr() returns one of these which basically accumulates argument inserts via arg() and then when asked to cast to FXString, actually performs the translation based upon any parameter specialisations defined for the current locale in the translation file.
QTransString also can convert to arbitrary language ids, but this functionality is protected as QTransString has an implicit conversion to FXString. It can even invoke a functor to return what language id to use, a facility used by Tn to return Just-In-Time-Help strings to multiple clients in multiple languages in a thread safe fashion. If you want this extended functionality, subclass QTransString.
Definition at line 52 of file QTrans.h.
Public Member Functions | |
QTransString (QTransString &o) | |
QTransString & | operator= (QTransString &) |
~QTransString () | |
QTransString & | arg (const FXString &str, FXint fieldwidth=0) |
QTransString & | arg (char c, FXint fieldwidth=0) |
QTransString & | arg (FXlong num, FXint fieldwidth=0, FXint base=10) |
QTransString & | arg (FXulong num, FXint fieldwidth=0, FXint base=10) |
QTransString & | arg (FXint num, FXint fieldwidth=0, FXint base=10) |
QTransString & | arg (FXuint num, FXint fieldwidth=0, FXint base=10) |
QTransString & | arg (double num, FXint fieldwidth=0, FXchar fmt='g', int prec=-1) |
operator FXString () | |
const FXchar * | text () |
void | save (FXStream &s) const |
void | load (FXStream &s) |
Protected Types | |
typedef Generic::Functor< Generic::TL::create< const FXString * >::value > | GetLangIdSpec |
Protected Member Functions | |
QTransString () | |
QTransString (const char *context, const char *text, const char *hint, const FXString *langid=0) | |
bool | empty () const throw () |
QTransString | copy () const |
GetLangIdSpec * | langIdFunc () const throw () |
void | setLangIdFunc (GetLangIdSpec *idfunc) throw () |
FXString | translate (const FXString *id=0) |
void | contents (const char *&context, const char *&text, const char *&hint) const |
Friends | |
class | QTrans |
struct | QTransStringPrivate |