Blender V4.3
BLT_lang.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11struct EnumPropertyItem;
12
13/* Search the path directory to the locale files, this try all
14 * the case for Linux, Win and Mac.
15 * Also dynamically builds locales and locales' menu from "languages" text file.
16 */
17void BLT_lang_init();
18
19/* Free languages and locales_menu arrays created by BLT_lang_init. */
20void BLT_lang_free();
21
22/* Set the current locale. */
23void BLT_lang_set(const char *);
24/* Get the current locale ([partial] ISO code, e.g. `pt_BR`). */
25const char *BLT_lang_get();
26
27/* Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g.
28 * if there is no variant, *variant and *language_variant will always be NULL).
29 * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them.
30 * NOTE: Always available, even in non-WITH_INTERNATIONAL builds.
31 */
41void BLT_lang_locale_explode(const char *locale,
42 char **language,
43 char **country,
44 char **variant,
45 char **language_country,
46 char **language_variant);
47
48/* Get EnumPropertyItem's for translations menu. */
void BLT_lang_locale_explode(const char *locale, char **language, char **country, char **variant, char **language_country, char **language_variant)
Definition blt_lang.cc:301
const char * BLT_lang_get()
Definition blt_lang.cc:281
const EnumPropertyItem * BLT_lang_RNA_enum_properties()
Definition blt_lang.cc:173
void BLT_lang_set(const char *)
Definition blt_lang.cc:251
void BLT_lang_init()
Definition blt_lang.cc:182
void BLT_lang_free()
Definition blt_lang.cc:227