Vidalia
0.2.17
|
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.torproject.org/projects/vidalia.html. No part of Vidalia, 00007 ** including this file, may be copied, modified, propagated, or distributed 00008 ** except according to the terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file LanguageSupport.h 00013 ** \brief Contains languages supported by Vidalia 00014 */ 00015 00016 #ifndef _LANGUAGESUPPORT_H 00017 #define _LANGUAGESUPPORT_H 00018 00019 #include <QStringList> 00020 #include <QMap> 00021 00022 00023 class LanguageSupport 00024 { 00025 public: 00026 /** Returns the default language code for the system locale. */ 00027 static QString defaultLanguageCode(); 00028 /** Returns the language code for a given language name. */ 00029 static QString languageCode(const QString &languageName); 00030 /** Returns a list of all supported language codes (e.g., "en"). */ 00031 static QStringList languageCodes(); 00032 /** Returns the language name for a given language code. */ 00033 static QString languageName(const QString &languageCode); 00034 /** Returns a list of all supported language names (e.g., "English"). */ 00035 static QStringList languageNames(); 00036 /** Returns a list of all supported language codes and names. */ 00037 static QMap<QString, QString> languages(); 00038 /** Returns true if we understand the given language code. */ 00039 static bool isValidLanguageCode(const QString &languageCode); 00040 }; 00041 00042 #endif 00043