Game Develop Core: gd::LocaleManager Class Reference

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gd::LocaleManager Class Reference

Class allowing to use a common wxLocale object for the IDE as well as for extensions. More...

`#include <LocaleManager.h>`

## Public Member Functions

bool | SetLanguage (int languageWxWidgetsId)
| Set the language used. More...
int | GetLanguage ()
| Get the language used. More...
void | AddCatalog (std::string catalogName)
| Add a catalog name. More...
void | AddPath (std::string path)
| Add a path where catalog are searched. More...

## Static Public Member Functions

static LocaleManager * | GetInstance ()
static void | DestroySingleton ()

## Public Attributes

wxLocale * | locale
| wxWidgets locale object

## Detailed Description

Class allowing to use a common wxLocale object for the IDE as well as for extensions.

You may want to use this class if you have a custom translation catalog to add. See LocaleManager::AddCatalog

## Member Function Documentation

void gd::LocaleManager::AddCatalog | ( | std::string | catalogName) |  |

Add a catalog name.

If catalog name is GD, then the file must be named GD.mo and located in a search path. ( locale directory for example or xxxPlatform/Extensions/locale ).

Parameters

  catalogName | The name of the translation catalog.

void gd::LocaleManager::AddPath | ( | std::string | path) |  |

Add a path where catalog are searched.

Parameters

  path | The path, relative to the Game Develop directory.

int gd::LocaleManager::GetLanguage | ( | ) |  |

inline

Get the language used.

Returns
  The wxWidgets identifier of the language used.

bool gd::LocaleManager::SetLanguage | ( | int | languageWxWidgetsId) |  |

Set the language used.

Parameters

  languageWxWidgetsId | The wxWidgets identifier of the language.

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

- LocaleManager.h
- LocaleManager.cpp