QuasarAppLib/locales.h

42 lines
993 B
C
Raw Normal View History

2018-09-29 15:56:04 +03:00
/*
2019-12-08 13:51:32 +03:00
* Copyright (C) 2018-2020 QuasarApp.
2018-09-29 15:56:04 +03:00
* Distributed under the lgplv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#ifndef LOCALES_H
#define LOCALES_H
#include "quasarapp_global.h"
class QCoreApplication;
class QTranslator;
namespace QuasarAppUtils {
/**
* @brief The Locales class for parese local files
*/
class QUASARAPPSHARED_EXPORT Locales
{
public:
Locales() = delete;
/**
* @brief initLocale init translation of applictaion
2018-12-06 21:30:48 +03:00
* @param prefix - path to folder with qm files. example (/home)
2018-09-29 15:56:04 +03:00
* @param locale - string value of locale. example (en)
* @param app - app core of qt
* @param translator - translator core of qt
* @return return true if locale funded
*/
2018-12-06 21:30:48 +03:00
static bool initLocale(const QString& prefix ,const QString &locale, QCoreApplication* app, QTranslator *translator);
2018-09-29 15:56:04 +03:00
};
}
#endif // LOCALES_H