Blender V2.61 - r43446

BLF_translation.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version. 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2011 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  *
00022  * Contributor(s): Blender Foundation,
00023  *                 Sergey Sharybin
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00033 #ifndef BLF_TRANSLATION_H
00034 #define BLF_TRANSLATION_H
00035 
00036 #define TEXT_DOMAIN_NAME "blender"
00037 
00038 /* blf_translation.c  */
00039 
00040 #ifdef WITH_INTERNATIONAL
00041 unsigned char *BLF_get_unifont(int *unifont_size);
00042 void BLF_free_unifont(void);
00043 #endif
00044 
00045 const char *BLF_gettext(const char *msgid);
00046 const char *BLF_pgettext(const char *context, const char *message);
00047 
00048 /* blf_lang.c */
00049 
00050 /*
00051  * Search the path directory to the locale files, this try all
00052  * the case for Linux, Win and Mac.
00053  */
00054 void BLF_lang_init(void);
00055 
00056 /* Set the current locale. */
00057 void BLF_lang_set(const char *);
00058 
00059 /* Set the current encoding name. */
00060 void BLF_lang_encoding_name(const char *str);
00061 
00062 void BLF_lang_encoding(const char *str);
00063 
00064 /* translation */
00065 int BLF_translate_iface(void);
00066 int BLF_translate_tooltips(void);
00067 const char *BLF_translate_do_iface(const char *msgid);
00068 const char *BLF_translate_do_tooltip(const char *msgid);
00069 
00070 
00071 /*#define _(msgid) BLF_gettext(msgid)*/
00072 /* The "translation-marker" macro. */
00073 #define N_(msgid) msgid
00074 /* Those macros should be used everywhere in UI code. */
00075 #define IFACE_(msgid) BLF_translate_do_iface(msgid)
00076 #define TIP_(msgid) BLF_translate_do_tooltip(msgid)
00077 
00078 #endif /* BLF_TRANSLATION_H */