2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version 2
5 * of the License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * The Original Code is Copyright (C) 2011 Blender Foundation.
17 * All rights reserved.
24 #ifndef __BLT_LANG_H__
25 #define __BLT_LANG_H__
31 /* Search the path directory to the locale files, this try all
32 * the case for Linux, Win and Mac.
33 * Also dynamically builds locales and locales' menu from "languages" text file.
35 void BLT_lang_init(void);
37 /* Free languages and locales_menu arrays created by BLT_lang_init. */
38 void BLT_lang_free(void);
40 /* Set the current locale. */
41 void BLT_lang_set(const char *);
42 /* Get the current locale ([partial] ISO code, e.g. es_ES). */
43 const char *BLT_lang_get(void);
45 /* Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g.
46 * if there is no variant, *variant and *language_variant will always be NULL).
47 * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them.
48 * NOTE: Always available, even in non-WITH_INTERNATIONAL builds.
50 void BLT_lang_locale_explode(const char *locale,
54 char **language_country,
55 char **language_variant);
57 /* Get EnumPropertyItem's for translations menu. */
58 struct EnumPropertyItem *BLT_lang_RNA_enum_properties(void);
64 #endif /* __BLT_LANG_H__ */