Supports multiple languages. More...
#include <string>
#include <vector>
#include <stack>
#include <list>
#include <map>
#include <stdlib.h>
#include <stdio.h>
#include "utils/memleak.h"
#include "utils/my_assert.h"
#include "utils.h"
#include "log.h"
#include "lang.h"
#include "compat.h"
#include "params.h"
#include "utils/precomp.h"
Go to the source code of this file.
Classes | |
class | c_lang |
Stores language entry (string in specific language) from lang/lang##.txt. More... | |
Functions | |
string | lang_01_init (string file_name) |
Initializes lang01 array from file lang/lang01.txt and sets lang01_init to true. | |
void | lang_get_langs (int file_id, vector< string > &langs) |
Enumerates available languages. | |
string | lang_get_string (int file_id, string lang, int id) |
Gets language-specific string, and initializes an array if needed. | |
void | lang_rehash () |
Rehashses the language files. | |
string | lang_subst (string str, const map< string, string > &subst) |
Routine for "%xxx;" substitution. | |
string | lang_subst (string str, string substr) |
Routine for "%s" substitution. | |
string | lang_subst_multi (const string &str, const vector< string > &subst) |
Substitutes multiple. | |
Variables | |
vector< c_lang > | lang01 |
If lang01_init == true: stores language entries from file lang/lang01.txt. | |
bool | lang01_init = false |
Set to true if lang01 contains entries (had been initialized). |
Supports multiple languages.
Definition in file lang.cpp.