Class that provide internationalization (i18n) features, such as language translation or region-specific units and date formatting.
More...
#include <Libs/MRML/Core/vtkMRMLI18N.h>
|
static std::string | Format (const std::string &text, const char *arg1=nullptr, const char *arg2=nullptr, const char *arg3=nullptr, const char *arg4=nullptr, const char *arg5=nullptr, const char *arg6=nullptr, const char *arg7=nullptr, const char *arg8=nullptr, const char *arg9=nullptr) |
|
static vtkMRMLI18N * | GetInstance () |
| Return the singleton instance with no reference counting.
|
|
static int | IsTypeOf (const char *type) |
|
static vtkMRMLI18N * | New () |
|
static vtkMRMLI18N * | SafeDownCast (vtkObject *o) |
|
static std::string | Translate (const char *context, const char *sourceText, const char *disambiguation=nullptr, int n=-1) |
| Translate message with the current translator.
|
|
Class that provide internationalization (i18n) features, such as language translation or region-specific units and date formatting.
Definition at line 32 of file vtkMRMLI18N.h.
◆ Self
◆ Superclass
◆ vtkMRMLI18N() [1/2]
vtkMRMLI18N::vtkMRMLI18N |
( |
| ) |
|
|
protected |
◆ ~vtkMRMLI18N()
vtkMRMLI18N::~vtkMRMLI18N |
( |
| ) |
|
|
overrideprotected |
◆ vtkMRMLI18N() [2/2]
◆ classFinalize()
static void vtkMRMLI18N::classFinalize |
( |
| ) |
|
|
staticprotected |
◆ classInitialize()
static void vtkMRMLI18N::classInitialize |
( |
| ) |
|
|
staticprotected |
Singleton management functions.
◆ Format()
static std::string vtkMRMLI18N::Format |
( |
const std::string & | text, |
|
|
const char * | arg1 = nullptr, |
|
|
const char * | arg2 = nullptr, |
|
|
const char * | arg3 = nullptr, |
|
|
const char * | arg4 = nullptr, |
|
|
const char * | arg5 = nullptr, |
|
|
const char * | arg6 = nullptr, |
|
|
const char * | arg7 = nullptr, |
|
|
const char * | arg8 = nullptr, |
|
|
const char * | arg9 = nullptr ) |
|
static |
Replace placeholders in strings, following Qt internationalization conventions.
Accepted placeholders in the input string: %1, %2, %3, ..., %9. Use %% instead of a single % to prevent replacement. For example "some %%3 thing" will result in "some %3 thing" (and will not be replaced by the third replacement string argument).
Example usage:
vtkMRMLTr(
"vtkMRMLVolumeArchetypeStorageNode",
"Cannot read '%1' file as a volume of type '%2'."),
filename.c_str(),
volumeType.c_str());
static std::string Format(const std::string &text, const char *arg1=nullptr, const char *arg2=nullptr, const char *arg3=nullptr, const char *arg4=nullptr, const char *arg5=nullptr, const char *arg6=nullptr, const char *arg7=nullptr, const char *arg8=nullptr, const char *arg9=nullptr)
#define vtkMRMLTr(context, sourceText)
Translation function used in MRML classes.
◆ GetClassName()
virtual const char * vtkMRMLI18N::GetClassName |
( |
| ) |
|
|
virtual |
◆ GetInstance()
Return the singleton instance with no reference counting.
◆ GetTranslator()
Get translator object that can translate text that is displayed to the user to the currently chosen language.
◆ IsA()
virtual int vtkMRMLI18N::IsA |
( |
const char * | type | ) |
|
|
virtual |
◆ IsTypeOf()
static int vtkMRMLI18N::IsTypeOf |
( |
const char * | type | ) |
|
|
static |
◆ New()
This is a singleton pattern New. There will only be ONE reference to a vtkMRMLI18N object per process. Clients that call this must call Delete on the object so that the reference counting will work. The single instance will be unreferenced when the program exits.
◆ operator=()
◆ PrintSelf()
void vtkMRMLI18N::PrintSelf |
( |
ostream & | os, |
|
|
vtkIndent | indent ) |
|
override |
◆ SafeDownCast()
static vtkMRMLI18N * vtkMRMLI18N::SafeDownCast |
( |
vtkObject * | o | ) |
|
|
static |
◆ SetTranslator()
Set translator object. This class takes ownership of the translator and it releases it when the process quits.
◆ Translate()
static std::string vtkMRMLI18N::Translate |
( |
const char * | context, |
|
|
const char * | sourceText, |
|
|
const char * | disambiguation = nullptr, |
|
|
int | n = -1 ) |
|
static |
Translate message with the current translator.
◆ vtkMRMLI18NInitialize
◆ Translator
The documentation for this class was generated from the following file: