tdesktop/Telegram/SourceFiles/lang/lang_keys.h

41 lines
1.3 KiB
C
Raw Normal View History

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#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
#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);
2020-09-30 09:11:44 +00:00
[[nodiscard]] inline QString langDayOfWeek(const QDate &date) {
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