|
Blender V5.0
|
#include <cstdlib>#include <cstring>#include <string>#include <clocale>#include "RNA_types.hh"#include "BLT_lang.hh"#include "BLT_translation.hh"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_appdir.hh"#include "DNA_userdef_types.h"#include "MEM_guardedalloc.h"#include "CLG_log.h"Go to the source code of this file.
Functions | |
| const EnumPropertyItem * | BLT_lang_RNA_enum_properties () |
| void | BLT_lang_init () |
| void | BLT_lang_free () |
| void | BLT_lang_set (const char *str) |
| const char * | BLT_lang_get () |
| void | BLT_lang_locale_explode (const char *locale, char **language, char **country, char **variant, char **language_country, char **language_variant) |
Variables | |
| static CLG_LogRef | LOG = {"translation"} |
Main internationalization functions to set the locale and query available languages.
Definition in file blt_lang.cc.
| void BLT_lang_free | ( | ) |
Definition at line 226 of file blt_lang.cc.
References blender::locale::free().
Referenced by WM_exit_ex().
| const char * BLT_lang_get | ( | ) |
Definition at line 265 of file blt_lang.cc.
References BLT_translate(), and blender::locale::full_name().
Referenced by app_translations_locale_get().
| void BLT_lang_init | ( | ) |
Definition at line 192 of file blt_lang.cc.
References BLI_getenv(), BLI_strdup(), CLOG_WARN, LOG, and MEM_freeN().
Referenced by reloadtranslation_exec(), and WM_init().
| void BLT_lang_locale_explode | ( | const char * | locale, |
| char ** | language, | ||
| char ** | country, | ||
| char ** | variant, | ||
| char ** | language_country, | ||
| char ** | language_variant ) |
Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g. if there is no variant, *variant and *language_variant will always be NULL). Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them.
Definition at line 285 of file blt_lang.cc.
References BLI_strdup(), BLI_strdupcat(), BLI_strdupn(), and MEM_freeN().
Referenced by app_translations_locale_explode().
| const EnumPropertyItem * BLT_lang_RNA_enum_properties | ( | ) |
Definition at line 183 of file blt_lang.cc.
Referenced by app_translations_locales_get().
| void BLT_lang_set | ( | const char * | str | ) |
Definition at line 250 of file blt_lang.cc.
References BKE_appdir_folder_id(), BLENDER_DATAFILES, blender::locale::init(), str, and TEXT_DOMAIN_NAME.
Referenced by reloadtranslation_exec(), and WM_init().
|
static |
Definition at line 36 of file blt_lang.cc.