Blender
V3.3
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include "RNA_types.h"
#include "BLT_lang.h"
#include "BLT_translation.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_appdir.h"
#include "IMB_thumbs.h"
#include "DNA_userdef_types.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Functions | |
EnumPropertyItem * | BLT_lang_RNA_enum_properties (void) |
void | BLT_lang_init (void) |
void | BLT_lang_free (void) |
void | BLT_lang_set (const char *str) |
const char * | BLT_lang_get (void) |
void | BLT_lang_locale_explode (const char *locale, char **language, char **country, char **variant, char **language_country, char **language_variant) |
Main internationalization functions to set the locale and query available languages.
Definition in file blt_lang.c.
Definition at line 224 of file blt_lang.c.
Referenced by WM_exit_ex().
const char* BLT_lang_get | ( | void | ) |
Definition at line 269 of file blt_lang.c.
References bl_locale_get(), and BLT_translate().
Referenced by app_translations_locale_get().
Definition at line 179 of file blt_lang.c.
References BKE_appdir_folder_id(), bl_locale_init(), BLENDER_DATAFILES, BLI_getenv(), BLI_strdup(), MEM_freeN, NULL, and TEXT_DOMAIN_NAME.
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 289 of file blt_lang.c.
References BLI_strdup(), BLI_strdupcat(), BLI_strdupn(), MEM_freeN, and NULL.
Referenced by app_translations_locale_explode().
EnumPropertyItem* BLT_lang_RNA_enum_properties | ( | void | ) |
Definition at line 170 of file blt_lang.c.
References NULL.
Referenced by app_translations_locales_get().
void BLT_lang_set | ( | const char * | str | ) |
Definition at line 238 of file blt_lang.c.
References bl_locale_set(), BLI_sprintfN(), BLI_strdupn(), IMB_thumb_clear_translations(), MEM_freeN, NULL, str, and void.
Referenced by reloadtranslation_exec(), and WM_init().