aboutsummaryrefslogtreecommitdiff
path: root/src/localization.hpp
blob: 8367ba380dd366f720a006a5625ac0bce490cc8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef LOCALIZATION_HPP
#define LOCALIZATION_HPP

#include <QObject>
#include <QTranslator>
#include <QLocale>
#include <optional>

class Localization : public QObject
{
    Q_OBJECT
public:
    explicit Localization(QObject *parent = nullptr);

    void setLocale(std::optional<QLocale> const & locale);

    void translate(QLocale const & locale);

signals:
    void translationChanged();

public:
    std::optional<QLocale> locale;
    QTranslator qt;
    QTranslator kristall;
};

#endif // LOCALIZATION_HPP