#include <MyGUI_LanguageManager.h>
Public Member Functions | |
void | initialise () |
void | shutdown () |
bool | load (const std::string &_file) |
void | _load (xml::ElementPtr _node, const std::string &_file, Version _version) |
void | setCurrentLanguage (const std::string &_name) |
const std::string & | getCurrentLanguage () |
UString | replaceTags (const UString &_line) |
UString | getTag (const UString &_tag) |
void | addUserTag (const UString &_tag, const UString &_replace) |
void | clearUserTags () |
bool | loadUserTags (const std::string &_file) |
Data Fields | |
delegates::CMultiDelegate1 < const std::string & > | eventChangeLanguage |
Definition at line 34 of file MyGUI_LanguageManager.h.
void MyGUI::LanguageManager::_load | ( | xml::ElementPtr | _node, | |
const std::string & | _file, | |||
Version | _version | |||
) |
Definition at line 64 of file MyGUI_LanguageManager.cpp.
Add user tag
Definition at line 304 of file MyGUI_LanguageManager.cpp.
void MyGUI::LanguageManager::clearUserTags | ( | ) |
Delete all user tags
Definition at line 309 of file MyGUI_LanguageManager.cpp.
const std::string & MyGUI::LanguageManager::getCurrentLanguage | ( | ) |
Get current language
Definition at line 299 of file MyGUI_LanguageManager.cpp.
Get tag value
Definition at line 286 of file MyGUI_LanguageManager.cpp.
void MyGUI::LanguageManager::initialise | ( | ) |
Definition at line 37 of file MyGUI_LanguageManager.cpp.
bool MyGUI::LanguageManager::load | ( | const std::string & | _file | ) |
Load additional MyGUI *_language.xml file
Definition at line 59 of file MyGUI_LanguageManager.cpp.
bool MyGUI::LanguageManager::loadUserTags | ( | const std::string & | _file | ) |
Definition at line 314 of file MyGUI_LanguageManager.cpp.
Replace all tags #{tagname} in _line with appropriate string dependent on current language or keep #{tagname} if 'tagname' not found found
Definition at line 212 of file MyGUI_LanguageManager.cpp.
void MyGUI::LanguageManager::setCurrentLanguage | ( | const std::string & | _name | ) |
Set current language for replacing #{} tags
Definition at line 120 of file MyGUI_LanguageManager.cpp.
void MyGUI::LanguageManager::shutdown | ( | ) |
Definition at line 48 of file MyGUI_LanguageManager.cpp.
delegates::CMultiDelegate1<const std::string &> MyGUI::LanguageManager::eventChangeLanguage |
Event : Change current language.
signature : void method(const std::string& _language);
_language | Current language. |
Definition at line 71 of file MyGUI_LanguageManager.h.