LanguageSupport Class Reference

#include <languagesupport.h>

List of all members.

Static Public Member Functions

static QString defaultLanguageCode ()
static QString languageCode (const QString &languageName)
static QStringList languageCodes ()
static QString languageName (const QString &languageCode)
static QStringList languageNames ()
static QMap< QString, QString > languages ()
static bool isValidLanguageCode (const QString &languageCode)
static bool isRightToLeft (const QString &languageCode)
static bool translate (const QString &languageCode)


Detailed Description

Definition at line 25 of file languagesupport.h.


Member Function Documentation

QString LanguageSupport::defaultLanguageCode (  )  [static]

Returns the default language code for the system locale.

Definition at line 76 of file languagesupport.cpp.

References isValidLanguageCode().

Referenced by VidaliaSettings::VidaliaSettings().

QString LanguageSupport::languageCode ( const QString &  languageName  )  [static]

Returns the language code for a given language name.

Definition at line 90 of file languagesupport.cpp.

References languages().

Referenced by AppearancePage::save().

QStringList LanguageSupport::languageCodes (  )  [static]

Returns a list of all supported language codes (e.g., "en").

Returns a list of all supported language codes. (e.g., "en").

Definition at line 97 of file languagesupport.cpp.

References languages().

Referenced by AppearancePage::AppearancePage(), isValidLanguageCode(), and Vidalia::showUsageMessageBox().

QString LanguageSupport::languageName ( const QString &  languageCode  )  [static]

Returns the language name for a given language code.

Definition at line 104 of file languagesupport.cpp.

References languages().

Referenced by AppearancePage::AppearancePage().

QStringList LanguageSupport::languageNames (  )  [static]

Returns a list of all supported language names (e.g., "English").

Definition at line 111 of file languagesupport.cpp.

References languages().

QMap< QString, QString > LanguageSupport::languages (  )  [static]

Returns a list of all supported language codes and names.

Initializes the list of available languages.

Definition at line 26 of file languagesupport.cpp.

Referenced by languageCode(), languageCodes(), languageName(), and languageNames().

bool LanguageSupport::isValidLanguageCode ( const QString &  languageCode  )  [static]

Returns true if we understand the given language code.

Definition at line 118 of file languagesupport.cpp.

References languageCodes().

Referenced by defaultLanguageCode(), translate(), and Vidalia::validateArguments().

bool LanguageSupport::isRightToLeft ( const QString &  languageCode  )  [static]

Returns true if languageCode requires a right-to-left layout.

Definition at line 125 of file languagesupport.cpp.

Referenced by translate().

bool LanguageSupport::translate ( const QString &  languageCode  )  [static]

Sets the application's translator to the specified language.

Definition at line 134 of file languagesupport.cpp.

References isRightToLeft(), isValidLanguageCode(), and vApp.

Referenced by Vidalia::setLanguage().


The documentation for this class was generated from the following files:

Generated on Sat Aug 16 17:31:49 2008 for Vidalia by  doxygen 1.5.6