Multilingual interface support added.

All modifications are behind compileflag INTERNATIONAL,
and affect these two directories; source/blender/src and
source/blender/ftfont.

Thanks to philipp, a new utf8towchar() function is added
to Shizu's work, which fixes the international support for
OSX. It also makes the iconv library obsolete. This means
all translation files (blender.mo) need to be 'recoded' to
UTF-8, and language support in the fileselect window and
the text editor is not possible. Iconv might be added in
the future to enable these features.
This commit is contained in:
2003-05-03 12:17:11 +00:00
parent da1e6bae44
commit b43473e425
18 changed files with 1459 additions and 122 deletions

View File

@@ -52,6 +52,10 @@
#include "MEM_guardedalloc.h"
#include "BMF_Api.h"
#ifdef INTERNATIONAL
#include "FTF_Api.h"
#include "BIF_language.h"
#endif
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
@@ -161,7 +165,7 @@ int BIF_read_homefile(void)
{
char tstr[FILE_MAXDIR+FILE_MAXFILE], scestr[FILE_MAXDIR];
char *home= BLI_gethome();
int success;
int success, result;
BLI_make_file_string(G.sce, tstr, home, ".B.blend");
strcpy(scestr, G.sce); /* temporal store */
@@ -199,6 +203,32 @@ int BIF_read_homefile(void)
U.vrmlflag= USERDEF_VRML_LAYERS;
}
#ifdef INTERNATIONAL
/* userdef multilanguage options */
/* uncomment with versionchange to 2.27 --phase */
/*
if (G.main->versionfile <= 226) {
U.language= 0;
U.fontsize= 12;
U.encoding= 0;
sprintf(U.fontname, ".bfont.ttf");
if( FTF_SetFont(".bfont.ttf", 12) ) {
FTF_SetLanguage("en");
FTF_SetEncoding("ASCII");
G.ui_international = TRUE;
} else {
G.ui_international = FALSE;
}
}
*/
if(U.transopts & TR_ALL)
set_ML_interface_font();
else
G.ui_international = FALSE;
#endif // INTERNATIONAL
space_set_commmandline_options();
reset_autosave();
@@ -451,6 +481,10 @@ void BIF_init(void)
init_draw_rects(); /* drawobject.c */
init_gl_stuff(); /* drawview.c */
#ifdef INTERNATIONAL
readMultiLingualFiles();
#endif
BIF_read_homefile();
readBlog();
@@ -497,6 +531,9 @@ void exit_usiblender(void)
freeNurblist(&editNurb);
fsmenu_free();
#ifdef INTERNATIONAL
languagesmenu_free();
#endif
RE_free_render_data();
RE_free_filt_mask();