yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
translator.h
Go to the documentation of this file.
1
#ifndef YAZE_UTIL_I18N_TRANSLATOR_H
2
#define YAZE_UTIL_I18N_TRANSLATOR_H
3
4
#include <string>
5
6
namespace
yaze
{
7
namespace
i18n {
8
9
// Translates a user-visible source string (the English msgid) into the active
10
// language. Returns a pointer that stays valid until the next language switch;
11
// never returns null.
12
//
13
// ImGui label convention is handled transparently: for a label like
14
// "Mode##selector" or "Layout###main", only the VISIBLE prefix ("Mode",
15
// "Layout") is translated while the "##id"/"###id" suffix is preserved
16
// byte-for-byte so ImGui widget state/IDs remain stable across languages.
17
// A pure-id label like "##foo" is returned unchanged.
18
const
char
*
tr
(
const
char
* source);
19
const
char
*
tr
(
const
std::string& source);
20
21
// Drops the internal resolution caches. Called by LanguageManager whenever the
22
// active language changes so the next frame re-resolves every string.
23
void
ClearTranslationCache
();
24
25
}
// namespace i18n
26
}
// namespace yaze
27
28
#endif
// YAZE_UTIL_I18N_TRANSLATOR_H
yaze::i18n::ClearTranslationCache
void ClearTranslationCache()
Definition
translator.cc:64
yaze::i18n::tr
const char * tr(const char *source)
Definition
translator.cc:50
yaze
Definition
patch_export_usage.cc:8
src
util
i18n
translator.h
Generated by
1.10.0