/* This file has been generated by the CMake qt_translation_loader().
 * It loads Qt application translations.
 *
 * Attention: All changes will be overwritten!!!
 */

#include <QCoreApplication>
#include <QLocale>
#include <QLatin1String>
#include <QTranslator>
#include <QLibraryInfo>

static void loadQtTranslation()
{
    QString locale = QLocale::system().name();
    QTranslator *qtTranslator = new QTranslator(qApp);

    if (qtTranslator->load(QLatin1String("qt_") + locale, QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
        qApp->installTranslator(qtTranslator);
    } else {
        delete qtTranslator;
    }

    QTranslator *appTranslator = new QTranslator(qApp);
    if (appTranslator->load(QString::fromLocal8Bit("@translations_dir@/@catalog_name@_%1.qm").arg(locale))) {
        QCoreApplication::installTranslator(appTranslator);
    } else if (locale == QLatin1String("C") ||
                locale.startsWith(QLatin1String("en"))) {
        // English is the default. It's translated anyway.
        delete appTranslator;
    }
}

Q_COREAPP_STARTUP_FUNCTION(loadQtTranslation)
