diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-22 18:04:40 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-22 18:04:40 +0400 |
commit | b5e85cae705f47ae5a32c97564e1942a95e75bb4 (patch) | |
tree | 67f6cc66a0f4b6052fb53270b6b2db2f30401e52 /source/blender/blenfont/BLF_translation.h | |
parent | c727f8cbde9b27433fa378d9a53ca9b8cefcc7d4 (diff) |
New "dynamic" i18n menu.
Now both UI translation menu (in userprefs) and isocodes are defined in a text file (release/datafiles/locale/languages), parsed at lunchtime. This way:
* No more need to edit Blender code each time we want to add an new language or reorganize the existing menu;
* Translators can easily add a new language for testing, by just editing the text file, so no more need to ask to change Blender code and wait for a new build to see your new translation work in Blender!
Remaining todo:
* Commit i18n py tools
* Update wiki doc!
Diffstat (limited to 'source/blender/blenfont/BLF_translation.h')
-rw-r--r-- | source/blender/blenfont/BLF_translation.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h index 278c45dac52..b01ce93cb65 100644 --- a/source/blender/blenfont/BLF_translation.h +++ b/source/blender/blenfont/BLF_translation.h @@ -49,9 +49,13 @@ const char *BLF_pgettext(const char *context, const char *message); /* Search the path directory to the locale files, this try all * the case for Linux, Win and Mac. + * Also dynamically builds locales and locales' menu from "languages" text file. */ void BLF_lang_init(void); +/* Free languages and locales_menu arrays created by BLF_lang_init. */ +void BLF_lang_free(void); + /* Set the current locale. */ void BLF_lang_set(const char *); /* Get the current locale (short code, e.g. es_ES). */ @@ -60,6 +64,9 @@ const char *BLF_lang_get(void); /* Set the current encoding name. */ void BLF_lang_encoding(const char *str); +/* Get EnumPropertyItem's for translations menu. */ +struct EnumPropertyItem *BLF_RNA_lang_enum_properties(void); + /* translation */ int BLF_translate_iface(void); int BLF_translate_tooltips(void); |