2019-07-22 20:53:05 +02:00
|
|
|
/*
|
|
|
|
* Strawberry Music Player
|
2021-03-20 21:14:47 +01:00
|
|
|
* Copyright 2019-2021, Jonas Kvinge <jonas@jkvinge.net>
|
2019-07-22 20:53:05 +02:00
|
|
|
*
|
|
|
|
* Strawberry is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Strawberry is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2021-01-26 16:48:04 +01:00
|
|
|
#pragma once
|
|
|
|
|
2019-07-22 20:53:05 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QList>
|
|
|
|
#include <QString>
|
|
|
|
|
2020-02-08 03:40:30 +01:00
|
|
|
class QTranslator;
|
|
|
|
|
2019-07-22 20:53:05 +02:00
|
|
|
class Translations : public QObject {
|
2021-06-20 19:04:08 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2019-07-22 20:53:05 +02:00
|
|
|
public:
|
2021-06-20 19:04:08 +02:00
|
|
|
explicit Translations(QObject *parent = nullptr);
|
2020-06-15 21:55:05 +02:00
|
|
|
~Translations() override;
|
2019-07-22 20:53:05 +02:00
|
|
|
void LoadTranslation(const QString &prefix, const QString &path, const QString &language);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QList<QTranslator*> translations_;
|
|
|
|
|
|
|
|
};
|