|
GlistEngine
|
#include <gLocalization.h>
Public Member Functions | |
| gLocalization () | |
| virtual | ~gLocalization () |
| void | loadDatabase (const std::string &database, const std::string &tableName="WORDS") |
| std::string | localizeWord (const std::string &word) |
| void | setCurrentLanguage (int languageId) |
| std::string | getCurrentLanguage () const |
| const std::vector< std::string > & | getAvailableLanguages () const |
| int | getLangId () const |
| std::string | getTableInfo () |
| std::string | getColumnData (const std::string &columnname) |
| const std::vector< std::string > & | getColumnList () const |
Database-driven localization system for multi-language text translation. Expects database table with "Key" column and language columns.
| gLocalization::gLocalization | ( | ) |
|
virtual |
| const std::vector< std::string > & gLocalization::getAvailableLanguages | ( | ) | const |
| std::string gLocalization::getColumnData | ( | const std::string & | columnname | ) |
| const std::vector< std::string > & gLocalization::getColumnList | ( | ) | const |
| std::string gLocalization::getCurrentLanguage | ( | ) | const |
| int gLocalization::getLangId | ( | ) | const |
| std::string gLocalization::getTableInfo | ( | ) |
| void gLocalization::loadDatabase | ( | const std::string & | database, |
| const std::string & | tableName = "WORDS" |
||
| ) |
Load localization database and parse available language columns
| database | Database file path |
| tableName | Table containing translations (default: "WORDS") |
| std::string gLocalization::localizeWord | ( | const std::string & | word | ) |
Translate word using current language setting
| word | Key to look up in database |
| void gLocalization::setCurrentLanguage | ( | int | languageId | ) |
Set active language by column index (0-based, excluding "Key" column)
| languageId | Language index (bounds-checked) |