MyGUI 3.2.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
MyGUI::LanguageManager Class Reference

`#include <MyGUI_LanguageManager.h>`

Inheritance diagram for MyGUI::LanguageManager:
[legend]

## Public Member Functions
| LanguageManager ()
void | initialise ()
void | shutdown ()
void | setCurrentLanguage (const std::string &_name)
const std::string & | getCurrentLanguage () const
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)
Public Member Functions inherited from MyGUI::Singleton< LanguageManager >
| Singleton ()
virtual | ~Singleton ()
Public Member Functions inherited from MyGUI::MemberObsolete< LanguageManager >
bool | load (const std::string &_file)

## Data Fields
delegates::CMultiDelegate1< const std::string & > | eventChangeLanguage
delegates::CDelegate2< const UString &, UString & > | eventRequestTag

## Additional Inherited Members
Public Types inherited from MyGUI::Singleton< LanguageManager >
typedef Singleton< LanguageManager > | Base
Static Public Member Functions inherited from MyGUI::Singleton< LanguageManager >
static LanguageManager & | getInstance ()
static LanguageManager * | getInstancePtr ()
static const char * | getClassTypeName ()

## Detailed Description

Definition at line 20 of file MyGUI_LanguageManager.h.

## Constructor & Destructor Documentation

MyGUI::LanguageManager::LanguageManager | ( |  | ) |

Definition at line 21 of file MyGUI_LanguageManager.cpp.

## Member Function Documentation

void MyGUI::LanguageManager::addUserTag | ( | const UString & | _tag,
|  | const UString & | _replace
| ) |  |

Add user tag

Definition at line 231 of file MyGUI_LanguageManager.cpp.

void MyGUI::LanguageManager::clearUserTags | ( |  | ) |

Delete all user tags

Definition at line 236 of file MyGUI_LanguageManager.cpp.

const std::string & MyGUI::LanguageManager::getCurrentLanguage | ( |  | ) | const

Get current language

Definition at line 226 of file MyGUI_LanguageManager.cpp.

UString MyGUI::LanguageManager::getTag | ( | const UString & | _tag | ) |

Get tag value

Definition at line 209 of file MyGUI_LanguageManager.cpp.

void MyGUI::LanguageManager::initialise | ( |  | ) |

Definition at line 27 of file MyGUI_LanguageManager.cpp.

bool MyGUI::LanguageManager::loadUserTags | ( | const std::string & | _file | ) |

Load user tags

Definition at line 241 of file MyGUI_LanguageManager.cpp.

UString MyGUI::LanguageManager::replaceTags | ( | const UString & | _line | ) |

Replace all tags #{tagname} in _line with appropriate string dependent on current language or keep #{tagname} if 'tagname' not found found

Definition at line 195 of file MyGUI_LanguageManager.cpp.

void MyGUI::LanguageManager::setCurrentLanguage | ( | const std::string & | _name | ) |

Set current language for replacing #{} tags

Definition at line 105 of file MyGUI_LanguageManager.cpp.

void MyGUI::LanguageManager::shutdown | ( |  | ) |

Definition at line 38 of file MyGUI_LanguageManager.cpp.

## Field Documentation

delegates::CMultiDelegate1<const std::string&> MyGUI::LanguageManager::eventChangeLanguage

Event : Change current language.
signature : void method(const std::string& _language);

Parameters

  _language | Current language.

Definition at line 55 of file MyGUI_LanguageManager.h.

delegates::CDelegate2<const UString&, UString&> MyGUI::LanguageManager::eventRequestTag

Event : Request tag.
signature : void method(const MyGUI::UString& _tag, MyGUI::UString& _result);

Parameters

  _tag | Tag than should be translated.
  _result | String that should be placed instead specified tag.

Note
  If this event is empty and _tag not found - "#{_tag}" used by default.

Definition at line 63 of file MyGUI_LanguageManager.h.

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

- MyGUI_LanguageManager.h
- MyGUI_LanguageManager.cpp