Plasma Engine  2.0
Loading...
Searching...
No Matches
plTranslatorFromFiles Class Reference

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>

Inheritance diagram for plTranslatorFromFiles:

Public Member Functions

void AddTranslationFilesFromFolder (const char *szFolder)
 Loads all files recursively from the specified folder as translation files.
 
virtual plStringView Translate (plStringView sString, plUInt64 uiStringHash, plTranslationUsage usage) override
 Returns the translated string for uiStringHash, or nullptr, if not available.
 
virtual void Reload () override
 Simply executes Reset() on this translator.
 
- Public Member Functions inherited from plTranslatorStorage
virtual void StoreTranslation (plStringView sString, plUInt64 uiStringHash, plTranslationUsage usage)
 Stores szString as the translation for the string with the given hash.
 
virtual void Reset () override
 Clears all stored translation strings.
 

Additional Inherited Members

- Static Public Member Functions inherited from plTranslator
static void ReloadAllTranslators ()
 Will call Reload() on all currently active translators.
 
static void HighlightUntranslated (bool bHighlight)
 
static bool GetHighlightUntranslated ()
 
- Protected Attributes inherited from plTranslatorStorage
plMap< plUInt64, plStringm_Translations [(int) plTranslationUsage::ENUM_COUNT]
 

Detailed Description

Loads translations from files. Each translator can have different search paths, but the files to be loaded are the same for all of them.

Member Function Documentation

◆ AddTranslationFilesFromFolder()

void plTranslatorFromFiles::AddTranslationFilesFromFolder ( const char * szFolder)

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 plFileSystemIterator to be available.

◆ Reload()

void plTranslatorFromFiles::Reload ( )
overridevirtual

Simply executes Reset() on this translator.

Reimplemented from plTranslatorStorage.

◆ Translate()

plStringView plTranslatorFromFiles::Translate ( plStringView sString,
plUInt64 uiStringHash,
plTranslationUsage usage )
overridevirtual

Returns the translated string for uiStringHash, or nullptr, if not available.

Reimplemented from plTranslatorStorage.


The documentation for this class was generated from the following files: