Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::Locale::LanguageData Class Reference

#include <Localization.h>

Public Types

using LangCallback = DELEGATE< void, std::string_view >
 

Public Member Functions

ErrorCode changeLanguage (std::string_view newLanguage)
 
const char * get (U64 key, bool appendSection, const char *defaultValue)
 
void setChangeLanguageCallback (const DELEGATE< void, std::string_view > &cbk)
 

Private Attributes

hashMap< U64, LanguageEntry_languageTable {}
 
LangCallback _languageChangeCallback {}
 

Detailed Description

Definition at line 53 of file Localization.h.

Member Typedef Documentation

◆ LangCallback

using Divide::Locale::LanguageData::LangCallback = DELEGATE<void, std::string_view>

Definition at line 55 of file Localization.h.

Member Function Documentation

◆ changeLanguage()

ErrorCode Divide::Locale::LanguageData::changeLanguage ( std::string_view  newLanguage)

Definition at line 57 of file Localization.cpp.

◆ get()

const char * Divide::Locale::LanguageData::get ( U64  key,
bool  appendSection,
const char *  defaultValue 
)

Definition at line 105 of file Localization.cpp.

◆ setChangeLanguageCallback()

void Divide::Locale::LanguageData::setChangeLanguageCallback ( const DELEGATE< void, std::string_view > &  cbk)

Definition at line 52 of file Localization.cpp.

Member Data Documentation

◆ _languageChangeCallback

LangCallback Divide::Locale::LanguageData::_languageChangeCallback {}
private

Definition at line 67 of file Localization.h.

◆ _languageTable

hashMap<U64, LanguageEntry> Divide::Locale::LanguageData::_languageTable {}
private

Each string key in the map matches a key in the language ini file each string value in the map matches the value in the ini file for the given key Basically, the hashMap is a direct copy of the [language] section of the give ini file

Definition at line 66 of file Localization.h.


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