![]() |
XII Release 0.1.0
|
Loads translations from files. Each translator can have different search paths, but the files to be loaded are the same for all of them. More...
#include <TranslationLookup.h>
Public Member Functions | |
void | AddTranslationFilesFromFolder (xiiStringView sFolder) |
Loads all files recursively from the specified folder as translation files. | |
virtual xiiStringView | Translate (xiiStringView sString, xiiUInt64 uiStringHash, xiiTranslationUsage usage) override |
Returns the translated string for uiStringHash, or nullptr, if not available. | |
virtual void | Reload () override |
Simply executes Reset() on this translator. | |
![]() | |
virtual void | StoreTranslation (xiiStringView sString, xiiUInt64 uiStringHash, xiiTranslationUsage usage) |
Stores sString as the translation for the string with the given hash. | |
virtual void | Reset () override |
Clears all stored translation strings. | |
Additional Inherited Members | |
![]() | |
static void | ReloadAllTranslators () |
Will call Reload() on all currently active translators. | |
static void | HighlightUntranslated (bool bHighlight) |
static bool | GetHighlightUntranslated () |
![]() | |
xiiMap< xiiUInt64, xiiString > | m_Translations [(xiiInt32) xiiTranslationUsage::ENUM_COUNT] |
Loads translations from files. Each translator can have different search paths, but the files to be loaded are the same for all of them.
void xiiTranslatorFromFiles::AddTranslationFilesFromFolder | ( | xiiStringView | sFolder | ) |
Loads all files recursively from the specified folder as translation files.
The given path must be absolute or resolvable to an absolute path. On failure, the function does nothing. This function depends on xiiFileSystemIterator to be available.
|
overridevirtual |
Simply executes Reset() on this translator.
Reimplemented from xiiTranslatorStorage.
|
overridevirtual |
Returns the translated string for uiStringHash, or nullptr, if not available.
Reimplemented from xiiTranslatorStorage.