MeshLib C++ Docs
Loading...
Searching...
No Matches
MRI18n.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
config.h
"
4
#ifndef MRVIEWER_NO_LOCALE
5
#include "exports.h"
6
7
#include <
MRMesh/MRMeshFwd.h
>
8
9
#include <string>
10
11
namespace
MR::Locale
12
{
13
15
MRVIEWER_API std::string
translate
(
const
char
* msg,
int
domainId = 0 );
16
18
MRVIEWER_API std::string
translate
(
const
char
* context,
const
char
* msg,
int
domainId = 0 );
19
21
MRVIEWER_API std::string
translate
(
const
char
* single,
const
char
* plural,
Int64
n,
int
domainId = 0 );
22
24
MRVIEWER_API std::string
translate
(
const
char
* context,
const
char
* single,
const
char
* plural,
Int64
n,
int
domainId = 0 );
25
26
}
27
28
#ifndef MR_NO_I18N_MACROS
29
#define _tr( ... ) MR::Locale::translate( __VA_ARGS__ ).c_str()
30
#define f_tr( ... ) fmt::runtime( MR::Locale::translate( __VA_ARGS__ ) )
31
#endif
32
33
#else
34
35
#ifndef MR_NO_I18N_MACROS
36
#define _tr( ... ) MR::Locale::translate_noop( __VA_ARGS__ )
37
#define f_tr( ... ) fmt::runtime( MR::Locale::translate_noop( __VA_ARGS__ ) )
38
#endif
39
40
#endif
MRMeshFwd.h
config.h
MR::Int64
std::int64_t Int64
Definition
MRMeshFwd.h:200
MR::Locale
Definition
MRMeshFwd.h:805
MR::Locale::translate
std::string translate(const char *msg, int domainId=0)
Translates a message using the active locale.
MRViewer
MRI18n.h
Generated by
1.14.0