languagesupport.h

Go to the documentation of this file.
00001 /*
00002 **  This file is part of Vidalia, and is subject to the license terms in the
00003 **  LICENSE file, found in the top level directory of this distribution. If you
00004 **  did not receive the LICENSE file with this file, you may obtain it from the
00005 **  Vidalia source package distributed by the Vidalia Project at
00006 **  http://www.vidalia-project.net/. No part of Vidalia, including this file,
00007 **  may be copied, modified, propagated, or distributed except according to the
00008 **  terms described in the LICENSE file.
00009 */
00010 
00011 /*
00012 ** \file languagesupport.h
00013 ** \version $Id: languagesupport.h 2362 2008-02-29 04:30:11Z edmanm $
00014 ** \brief Contains languages supported by Vidalia
00015 */
00016 
00017 #ifndef _LANGUAGESUPPORT_H
00018 #define _LANGUAGESUPPORT_H
00019 
00020 #include <QApplication>
00021 #include <QStringList>
00022 #include <QMap>
00023 
00024 
00025 class LanguageSupport
00026 {
00027 public:
00028   /** Returns the default language code for the system locale. */
00029   static QString defaultLanguageCode();
00030   /** Returns the language code for a given language name. */
00031   static QString languageCode(const QString &languageName);
00032   /** Returns a list of all supported language codes (e.g., "en"). */
00033   static QStringList languageCodes();
00034   /** Returns the language name for a given language code. */
00035   static QString languageName(const QString &languageCode);
00036   /** Returns a list of all supported language names (e.g., "English"). */
00037   static QStringList languageNames();
00038   /** Returns a list of all supported language codes and names. */
00039   static QMap<QString, QString> languages();
00040   /** Returns true if we understand the given language code. */
00041   static bool isValidLanguageCode(const QString &languageCode);
00042   /** Returns true if <b>languageCode</b> requires a right-to-left layout. */
00043   static bool isRightToLeft(const QString &languageCode);
00044   /** Sets the application's translator to the specified language. */
00045   static bool translate(const QString &languageCode);
00046 };
00047 
00048 #endif
00049 

Generated on Sat Aug 16 17:38:35 2008 for Vidalia by  doxygen 1.5.6