Sayonara Player
Loading...
Searching...
No Matches
LanguageUtils.h
1/* LanguageUtils.h */
2
3/* Copyright (C) 2011-2024 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 getHttpPath(const QString& fourLetter);
38
39 QString getChecksumHttpPath();
40
41 QString getHomeTargetPath(const QString& fourLetter);
42
43 QString getUsedLanguageFile(const QString& fourLetter);
44
45 QString getIconPath(const QString& fourLetter);
46
47 QString extractLanguageCode(const QString& languageFile);
48
49 QString getChecksum(const QString& fourLetter);
50
51 void updateLanguageVersion(const QString& fourLetter);
52
53 bool isOutdated(const QString& fourLetter);
54
55 QString getSimilarLanguage4(const QString& fourLetter);
56
57 QLocale getCurrentLocale();
58
59 QStringList getCurrentQtTranslationPaths();
60
61 bool importLanguageFile(const QString& filename);
62
63 QString convertOldLanguage(const QString& languageCode);
64
65 QMap<QString, QLocale> availableLanguages();
66
67#ifdef SAYONARA_WITH_TESTS
68 void setLanguageSettingFilename(const QString& filename);
69 void setLanguageVersion(const QString& fourLetter, const QString& version);
70#endif
71}
72
73#endif // LANGUAGEUTILS_H
Definition org_mpris_media_player2_adaptor.h:21