2014-12-18 18:40:49 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-12-18 18:40:49 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-12-18 18:40:49 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2020-09-30 09:11:44 +00:00
|
|
|
#include "lang_auto.h"
|
2017-09-28 20:11:10 +00:00
|
|
|
#include "lang/lang_hardcoded.h"
|
2019-09-17 07:51:02 +00:00
|
|
|
#include "lang/lang_text_entity.h"
|
2017-04-12 19:17:55 +00:00
|
|
|
|
2020-09-30 11:32:02 +00:00
|
|
|
#include <QDateTime>
|
|
|
|
|
2020-09-30 09:11:44 +00:00
|
|
|
[[nodiscard]] QString langDayOfMonth(const QDate &date);
|
|
|
|
[[nodiscard]] QString langDayOfMonthFull(const QDate &date);
|
|
|
|
[[nodiscard]] QString langMonthOfYear(int month, int year);
|
|
|
|
[[nodiscard]] QString langMonth(const QDate &date);
|
|
|
|
[[nodiscard]] QString langMonthOfYearFull(int month, int year);
|
|
|
|
[[nodiscard]] QString langMonthFull(const QDate &date);
|
|
|
|
[[nodiscard]] QString langDayOfWeek(int index);
|
2015-12-22 15:32:45 +00:00
|
|
|
|
2020-09-30 09:11:44 +00:00
|
|
|
[[nodiscard]] inline QString langDayOfWeek(const QDate &date) {
|
2017-03-07 14:03:07 +00:00
|
|
|
return langDayOfWeek(date.dayOfWeek());
|
|
|
|
}
|
|
|
|
|
2020-09-30 09:11:44 +00:00
|
|
|
[[nodiscard]] QString langDateTime(const QDateTime &date);
|
|
|
|
[[nodiscard]] QString langDateTimeFull(const QDateTime &date);
|
|
|
|
[[nodiscard]] bool langFirstNameGoesSecond();
|
2015-12-21 13:14:29 +00:00
|
|
|
|
2020-09-30 09:11:44 +00:00
|
|
|
namespace Lang {
|
|
|
|
|
|
|
|
[[nodiscard]] QString Id();
|
|
|
|
[[nodiscard]] rpl::producer<> Updated();
|
|
|
|
[[nodiscard]] QString GetNonDefaultValue(const QByteArray &key);
|
2023-01-30 10:10:42 +00:00
|
|
|
[[nodiscard]] QString DefaultLanguageId();
|
|
|
|
[[nodiscard]] QString LanguageIdOrDefault(const QString &id);
|
2015-12-21 13:14:29 +00:00
|
|
|
|
2020-09-30 09:11:44 +00:00
|
|
|
} // namespace Lang
|