Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Namespaces | Typedefs | Functions | Variables
translation.h File Reference
#include <tinyformat.h>
#include <util/string.h>
#include <cassert>
#include <functional>
#include <string>
Include dependency graph for translation.h:

Go to the source code of this file.

Classes

struct  bilingual_str
 Bilingual messages: More...
 
struct  util::TranslatedLiteral
 Compile-time literal string that can be translated with an optional translation function. More...
 
struct  util::BilingualFmt< num_params >
 

Namespaces

namespace  util
 
namespace  tinyformat
 

Typedefs

using TranslateFn = std::function< std::string(const char *)>
 Translate a message to the native language of the user. More...
 

Functions

bilingual_str operator+ (bilingual_str lhs, const bilingual_str &rhs)
 
std::ostream & util::operator<< (std::ostream &os, const TranslatedLiteral &lit)
 
template<typename T >
util::operator+ (const T &lhs, const TranslatedLiteral &rhs)
 
template<typename T >
util::operator+ (const TranslatedLiteral &lhs, const T &rhs)
 
consteval auto _ (util::TranslatedLiteral str)
 
bilingual_str Untranslated (std::string original)
 Mark a bilingual_str as untranslated. More...
 
template<typename... Args>
bilingual_str tinyformat::format (util::BilingualFmt< sizeof...(Args)> fmt, const Args &... args)
 

Variables

const TranslateFn G_TRANSLATION_FUN
 Translate string to current locale using Qt. More...
 

Typedef Documentation

◆ TranslateFn

using TranslateFn = std::function<std::string(const char*)>

Translate a message to the native language of the user.

Definition at line 16 of file translation.h.

Function Documentation

◆ _()

consteval auto _ ( util::TranslatedLiteral  str)

Definition at line 79 of file translation.h.

◆ operator+()

bilingual_str operator+ ( bilingual_str  lhs,
const bilingual_str rhs 
)
inline

Definition at line 47 of file translation.h.

◆ Untranslated()

bilingual_str Untranslated ( std::string  original)
inline

Mark a bilingual_str as untranslated.

Definition at line 82 of file translation.h.

Variable Documentation

◆ G_TRANSLATION_FUN

const TranslateFn G_TRANSLATION_FUN
extern

Translate string to current locale using Qt.

Definition at line 53 of file bitcoin-cli.cpp.