Sayonara Player
LanguageUtils.h
1/* LanguageUtils.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef LANGUAGEUTILS_H
22#define LANGUAGEUTILS_H
23
24#include "Utils/Macros.h"
25
26class QString;
27class QStringList;
28class QLocale;
29
30template<typename A, typename B>
31class QMap;
32
33namespace Util::Language
34{
35 QString getSharePath(const QString& fourLetter);
36
37 QString getFtpPath(const QString& fourLetter);
38
39 QString getHttpPath(const QString& fourLetter);
40
41 QString getChecksumHttpPath();
42
43 QString getHomeTargetPath(const QString& fourLetter);
44
45 QString getUsedLanguageFile(const QString& fourLetter);
46
47 QString getIconPath(const QString& fourLetter);
48
49 QString extractLanguageCode(const QString& languageFile);
50
51 QString getChecksum(const QString& fourLetter);
52
53 void updateLanguageVersion(const QString& fourLetter);
54
55 bool isOutdated(const QString& fourLetter);
56
57 QString getSimilarLanguage4(const QString& fourLetter);
58
59 QLocale getCurrentLocale();
60
61 QStringList getCurrentQtTranslationPaths();
62
63 bool importLanguageFile(const QString& filename);
64
65 QString convertOldLanguage(const QString& languageCode);
66
67 QMap<QString, QLocale> availableLanguages();
68
69#ifdef SAYONARA_WITH_TESTS
70 void setLanguageSettingFilename(const QString& filename);
71 void setLanguageVersion(const QString& fourLetter, const QString& version);
72#endif
73}
74
75#endif // LANGUAGEUTILS_H
Definition: org_mpris_media_player2_adaptor.h:21