Blender V5.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
8
9#pragma once
10
11namespace blender {
12
13struct EnumPropertyItem;
14
15/* Search the path directory to the locale files, this try all
16 * the case for Linux, Win and Mac.
17 * Also dynamically builds locales and locales' menu from "languages" text file.
18 */
19void BLT_lang_init();
20
21/* Free languages and locales_menu arrays created by BLT_lang_init. */
22void BLT_lang_free();
23
24/* Set the current locale. */
25void BLT_lang_set(const char *);
26/* Get the current locale ([partial] ISO code, e.g. `pt_BR`). */
27const char *BLT_lang_get();
28
29/* Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g.
30 * if there is no variant, *variant and *language_variant will always be NULL).
31 * Non-null elements are always MEM_new_uninitialized'ed, it's the caller's responsibility to free
32 * them. NOTE: Always available, even in non-WITH_INTERNATIONAL builds.
33 */
44void BLT_lang_locale_explode(const char *locale,
45 char **language,
46 char **country,
47 char **variant,
48 char **language_country,
49 char **language_variant);
50
51/* Get EnumPropertyItem's for translations menu. */
53
54} // namespace blender
BMesh Iterators.
void BLT_lang_set(const char *)
Definition blt_lang.cc:253
void BLT_lang_init()
Definition blt_lang.cc:195
void BLT_lang_free()
Definition blt_lang.cc:229
void BLT_lang_locale_explode(const char *locale, char **language, char **country, char **variant, char **language_country, char **language_variant)
Definition blt_lang.cc:288
const char * BLT_lang_get()
Definition blt_lang.cc:268
const EnumPropertyItem * BLT_lang_RNA_enum_properties()
Definition blt_lang.cc:186