3 #include <glib/gi18n-lib.h>
5 static gboolean chimara_initialized = FALSE;
7 /* This function is called at every entry point of the library, to set up
8 threads and gettext. It is NOT called from Glk functions. */
12 if( G_UNLIKELY(!chimara_initialized) )
15 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
16 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
18 /* Make sure threads have been initialized */
19 if(!g_thread_supported())
20 g_error(_("In order to use the Chimara library, you must initialize"
21 " the thread system by calling g_threads_init() and "
22 "gdk_threads_init() BEFORE the initial call to gtk_init() in "
23 "your main program."));
25 /* Initialize thread-private data */
26 extern GPrivate *glk_data_key;
27 glk_data_key = g_private_new(NULL);