diff --git a/ChangeLog b/ChangeLog index 3773759492..eb84848700 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-02-12 Tor Lillqvist + + * app/widgets/gimplanguagestore-parser.c + (gimp_language_store_populate): Don't use the compile-time paths + to iso-codes on Windows. Instead assume iso-codes is installed in + the same location as GIMP. Make sure translated language names are + in UTF-8 by calling bind_textdomain_codeset(). + 2008-02-11 Sven Neumann * app/widgets/Makefile.am diff --git a/app/widgets/gimplanguagestore-parser.c b/app/widgets/gimplanguagestore-parser.c index 685463c27e..3e680ac901 100644 --- a/app/widgets/gimplanguagestore-parser.c +++ b/app/widgets/gimplanguagestore-parser.c @@ -25,6 +25,8 @@ #include +#include "libgimpbase/gimpenv.h" + #include "widgets-types.h" #include "config/gimpxmlparser.h" @@ -90,13 +92,24 @@ gimp_language_store_populate (GimpLanguageStore *store, g_return_val_if_fail (GIMP_IS_LANGUAGE_STORE (store), FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); +#ifndef G_OS_WIN32 bindtextdomain ("iso_639", ISO_CODES_LOCALEDIR); +#else + /* Assume iso-codes is installed in the same location as GIMP */ + bindtextdomain ("iso_639", gimp_locale_directory ()); +#endif + + bind_textdomain_codeset ("iso_639", "UTF-8"); parser.store = g_object_ref (store); xml_parser = gimp_xml_parser_new (&markup_parser, &parser); +#ifndef G_OS_WIN32 filename = g_build_filename (ISO_CODES_LOCATION, "iso_639.xml", NULL); +#else + filename = g_build_filename (gimp_data_directory (), "..", "..", "xml", "iso-codes", "iso_639.xml", NULL); +#endif success = gimp_xml_parser_parse_file (xml_parser, filename, error);