Monero
Loading...
Searching...
No Matches
i18n.cpp File Reference
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <string>
#include <map>
#include "file_io_utils.h"
#include "common/i18n.h"
#include "translation_files.h"
#include <boost/system/error_code.hpp>
#include <boost/filesystem.hpp>
#include <algorithm>
Include dependency graph for i18n.cpp:

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "i18n"
#define MAX_LANGUAGE_SIZE   16
#define i18n_log(x)

Functions

std::string i18n_get_language ()
static uint32_t be32 (const unsigned char *data)
static std::string utf16 (const unsigned char *data, uint32_t len)
static std::string utf8 (const unsigned char *data, uint32_t len)
int i18n_set_language (const char *directory, const char *base, std::string language)
const char * i18n_translate (const char *s, const std::string &context)

Variables

static const unsigned char qm_magic [16] = {0x3c, 0xb8, 0x64, 0x18, 0xca, 0xef, 0x9c, 0x95, 0xcd, 0x21, 0x1c, 0xbf, 0x60, 0xa1, 0xbd, 0xdd}
static std::map< std::string, std::string > i18n_entries

Macro Definition Documentation

◆ i18n_log

#define i18n_log ( x)
Value:
((void)0)

◆ MAX_LANGUAGE_SIZE

#define MAX_LANGUAGE_SIZE   16

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "i18n"

Function Documentation

◆ be32()

uint32_t be32 ( const unsigned char * data)
static

◆ i18n_get_language()

std::string i18n_get_language ( )

◆ i18n_set_language()

int i18n_set_language ( const char * directory,
const char * base,
std::string language )

◆ i18n_translate()

const char * i18n_translate ( const char * s,
const std::string & context )

◆ utf16()

std::string utf16 ( const unsigned char * data,
uint32_t len )
static

◆ utf8()

std::string utf8 ( const unsigned char * data,
uint32_t len )
static

Variable Documentation

◆ i18n_entries

std::map<std::string,std::string> i18n_entries
static

◆ qm_magic

const unsigned char qm_magic[16] = {0x3c, 0xb8, 0x64, 0x18, 0xca, 0xef, 0x9c, 0x95, 0xcd, 0x21, 0x1c, 0xbf, 0x60, 0xa1, 0xbd, 0xdd}
static