Go to the source code of this file.
Classes | |
struct | language_def |
struct | symbol_table |
Typedefs | |
typedef std::vector< language_def > | language_list |
Functions | |
bool & | time_locale_correct () |
std::vector< language_def > | get_languages (bool all=false) |
Return a list of available translations. More... | |
void | set_language (const language_def &locale) |
const language_def & | get_language () |
bool | current_language_rtl () |
const language_def & | get_locale () |
void | init_textdomains (const game_config_view &cfg) |
Initializes the list of textdomains from a configuration object. More... | |
bool | init_strings (const game_config_view &cfg) |
Initializes certain English strings. More... | |
bool | load_language_list () |
int | get_min_translation_percent () |
void | set_min_translation_percent (int percent) |
Variables | |
symbol_table | string_table |
typedef std::vector<language_def> language_list |
Definition at line 65 of file language.hpp.
bool current_language_rtl | ( | ) |
Definition at line 54 of file language.cpp.
References get_language(), and language_def::rtl.
const language_def& get_language | ( | ) |
Definition at line 325 of file language.cpp.
Referenced by current_language_rtl(), intf_get_language(), gui2::dialogs::language_selection::language_selection(), gui2::dialogs::language_selection::pre_show(), and gui2::dialogs::game_version::show_manual().
std::vector<language_def> get_languages | ( | bool | all = false | ) |
Return a list of available translations.
The list will normally be filtered with incomplete (according to min_translation_percent) translations removed.
all | if true, include incomplete translations |
Definition at line 126 of file language.cpp.
References known_languages.
Referenced by test_utils::game_config_manager::game_config_manager(), game_launcher::init_language(), and gui2::dialogs::title_screen::update_static_labels().
const language_def& get_locale | ( | ) |
Definition at line 327 of file language.cpp.
References prefs::get(), i, known_languages, LOG_G, and translation::set_language().
Referenced by translation::dgettext(), translation::dsngettext(), translation::egettext(), translation::get_effective_locale_info(), game_launcher::init_language(), and translation::strftime().
int get_min_translation_percent | ( | ) |
Definition at line 143 of file language.cpp.
Referenced by gui2::dialogs::language_selection::language_selection().
bool init_strings | ( | const game_config_view & | cfg | ) |
Initializes certain English strings.
Definition at line 383 of file language.cpp.
References game_config_view::child_range(), and load_strings().
Referenced by game_config_manager::load_game_config().
void init_textdomains | ( | const game_config_view & | cfg | ) |
Initializes the list of textdomains from a configuration object.
Definition at line 365 of file language.cpp.
References t_string::add_textdomain(), game_config_view::child_range(), filesystem::get_binary_dir_location(), filesystem::get_intl_dir(), game_config::path, t, and WRN_G.
Referenced by test_utils::game_config_manager::game_config_manager(), game_config_manager::init_game_config(), game_launcher::play_screenshot_mode(), and game_launcher::start_editor().
bool load_language_list | ( | ) |
Definition at line 103 of file language.cpp.
References config::child_range(), filesystem::get_wml_location(), known_languages, N_, preprocess_file(), and read().
Referenced by test_utils::game_config_manager::game_config_manager(), and game_launcher::init_language().
void set_language | ( | const language_def & | locale | ) |
Definition at line 291 of file language.cpp.
References language_def::alternates, load_strings(), language_def::localename, translation::set_language(), time_locale_correct(), and wesnoth_setlocale().
void set_min_translation_percent | ( | int | percent | ) |
Definition at line 148 of file language.cpp.
Referenced by game_launcher::game_launcher().
bool& time_locale_correct | ( | ) |
Definition at line 66 of file language.cpp.
Referenced by set_language(), and wesnoth_setlocale().
|
extern |
Definition at line 64 of file language.cpp.
Referenced by attack_info(), combine_special_notes(), gui2::dialogs::game_load::evaluate_summary_string(), help::unit_topic_generator::operator()(), gui2::dialogs::unit_attack::pre_show(), gui2::unit_preview_pane::print_attack_details(), gui2::dialogs::attack_predictions::set_data(), and unit_alignment().