5#ifndef BITCOIN_UTIL_TRANSLATION_H
6#define BITCOIN_UTIL_TRANSLATION_H
55template <
typename... Args>
58 const auto translate_arg{[](
const auto& arg,
bool translated) ->
const auto& {
59 if constexpr (std::is_same_v<
decltype(arg),
const bilingual_str&>) {
60 return translated ? arg.translated : arg.original;
71 const char*
const lit;
consteval ConstevalStringLiteral(const char *str)
consteval ConstevalStringLiteral(std::nullptr_t)=delete
bilingual_str & operator+=(const bilingual_str &rhs)
const std::function< std::string(const char *)> G_TRANSLATION_FUN
Translate a message to the native language of the user.
bilingual_str _(ConstevalStringLiteral str)
Translation function.
bilingual_str operator+(bilingual_str lhs, const bilingual_str &rhs)
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.