2023-01-30 10:10:42 +00:00
|
|
|
/*
|
|
|
|
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
|
|
|
|
|
|
|
|
struct LanguageId;
|
|
|
|
|
2023-02-07 12:29:34 +00:00
|
|
|
namespace tr {
|
|
|
|
struct now_t;
|
|
|
|
} // namespace tr
|
|
|
|
|
2023-01-30 10:10:42 +00:00
|
|
|
namespace Ui {
|
|
|
|
|
|
|
|
class GenericBox;
|
|
|
|
|
|
|
|
[[nodiscard]] QString LanguageNameTranslated(const QString &twoLetterCode);
|
2023-02-07 12:29:34 +00:00
|
|
|
[[nodiscard]] QString LanguageNameLocal(LanguageId id);
|
2023-01-30 10:10:42 +00:00
|
|
|
[[nodiscard]] QString LanguageName(LanguageId id);
|
|
|
|
[[nodiscard]] QString LanguageNameNative(LanguageId id);
|
|
|
|
|
2023-02-07 12:29:34 +00:00
|
|
|
[[nodiscard]] rpl::producer<QString> TranslateBarTo(LanguageId id);
|
|
|
|
[[nodiscard]] QString TranslateMenuDont(tr::now_t, LanguageId id);
|
|
|
|
|
2023-01-30 10:10:42 +00:00
|
|
|
void ChooseLanguageBox(
|
|
|
|
not_null<GenericBox*> box,
|
|
|
|
rpl::producer<QString> title,
|
|
|
|
Fn<void(std::vector<LanguageId>)> callback,
|
2023-02-03 07:20:09 +00:00
|
|
|
std::vector<LanguageId> selected,
|
|
|
|
bool multiselect);
|
2023-01-30 10:10:42 +00:00
|
|
|
|
|
|
|
} // namespace Ui
|