Vidalia 0.3.1
LanguageSupport.h
Go to the documentation of this file.
1/*
2** This file is part of Vidalia, and is subject to the license terms in the
3** LICENSE file, found in the top level directory of this distribution. If you
4** did not receive the LICENSE file with this file, you may obtain it from the
5** Vidalia source package distributed by the Vidalia Project at
6** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7** including this file, may be copied, modified, propagated, or distributed
8** except according to the terms described in the LICENSE file.
9*/
10
11/*
12** \file LanguageSupport.h
13** \brief Contains languages supported by Vidalia
14*/
15
16#ifndef _LANGUAGESUPPORT_H
17#define _LANGUAGESUPPORT_H
18
19#include <QStringList>
20#include <QMap>
21
22
24{
25public:
26 /** Returns the default language code for the system locale. */
27 static QString defaultLanguageCode();
28 /** Returns the language code for a given language name. */
29 static QString languageCode(const QString &languageName);
30 /** Returns a list of all supported language codes (e.g., "en"). */
31 static QStringList languageCodes();
32 /** Returns the language name for a given language code. */
33 static QString languageName(const QString &languageCode);
34 /** Returns a list of all supported language names (e.g., "English"). */
35 static QStringList languageNames();
36 /** Returns a list of all supported language codes and names. */
37 static QMap<QString, QString> languages();
38 /** Returns true if we understand the given language code. */
39 static bool isValidLanguageCode(const QString &languageCode);
40};
41
42#endif
43
static QMap< QString, QString > languages()
static QString languageName(const QString &languageCode)
static bool isValidLanguageCode(const QString &languageCode)
static QStringList languageCodes()
static QString languageCode(const QString &languageName)
static QString defaultLanguageCode()
static QStringList languageNames()