summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util.c8
-rw-r--r--src/util.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 3b7a2da..54cdd6d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -389,3 +389,11 @@ verify_xpg_locale (const char *locale)
{
return (explode_locale (locale, NULL, NULL, NULL, NULL) & COMPONENT_LANGUAGE);
}
+
+gboolean
+verify_locale (const char *locale)
+{
+ if (locale && *locale == '\0')
+ return TRUE;
+ return verify_xpg_locale (locale);
+}
diff --git a/src/util.h b/src/util.h
index c51887e..a42d0ed 100644
--- a/src/util.h
+++ b/src/util.h
@@ -44,6 +44,7 @@ gint get_user_groups (const gchar *username,
gid_t **groups);
gboolean verify_xpg_locale (const char *locale);
+gboolean verify_locale (const char *locale);
G_END_DECLS