+ gchar **languages = (gchar **)g_get_language_names();
+ // lang_index is the index of the language for the best Name key in the language vector
+ // lang_index_default is a constant that encodes the Name key without a language
+ int lang_index, lang_index_default;
+#define LANG_DBG 0
+ if (LANG_DBG) printf("Languages:");
+ for (i = 0; languages[i]; i++) {
+ if (LANG_DBG) printf(" %s", languages[i]);
+ }
+ if (LANG_DBG) printf("\n");
+ lang_index_default = i;
+ // we currently do not know about any Name key at all, so use an invalid index
+ lang_index = lang_index_default + 1;
+