aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cerence/xt9/xt9common/xt9languagemap.h
blob: ed14a0feca8bdf0de7fd427a5278e8ae3d52fdfa (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef XT9LANGUAGEMAP_H
#define XT9LANGUAGEMAP_H

#include <QLocale>
#include <et9api.h>

QT_BEGIN_NAMESPACE
namespace QtVirtualKeyboard {

class Xt9LanguageMap
{
private:
    Xt9LanguageMap();

public:
    static ET9U32 languageId(const QLocale &locale);
    static QLocale locale(ET9U32 languageId);

private:
    struct SimpleLanguageMapEntry {
        ET9U32 languageId;
        QLocale::Language localeLanguage;
    };

    struct LanguageMapEntry {
        ET9U32 languageId;
        QLocale locale;
    };

    static const SimpleLanguageMapEntry SIMPLE_LANGUAGE_MAP[];
    static const struct LanguageMapEntry LANGUAGE_MAP[];
};

} // namespace QtVirtualKeyboard
QT_END_NAMESPACE

#endif // XT9LANGUAGEMAP_H