- /* Convert to a short form language code */
- gchar *command = g_strconcat ("/usr/share/language-tools/language-validate ", lang, NULL);
- gchar *out;
- GError *error = NULL;
- if (g_spawn_command_line_sync (command, &out, NULL, NULL, &error))
- {
- short_lang = g_strdup (g_strchomp (out));
- g_free (out);
- g_free (command);
- }
- else
- {
- g_warning ("Failed to run '%s': %s", command, error->message);
- g_error_free (error);
- g_free (command);
- return NULL;
- }
-
-match:
-