summaryrefslogtreecommitdiff
path: root/src/include/taler_util.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-19 18:19:00 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-19 18:19:00 +0200
commit46dde9368f75013b2383c24d4c8a11763ac8e31e (patch)
tree7971e4bdd18a951521e4317b1619ecbabbc15a8c /src/include/taler_util.h
parenta84c61dd82b17bc42593e5fd358cd0917d195f4f (diff)
downloadexchange-46dde9368f75013b2383c24d4c8a11763ac8e31e.tar.gz
exchange-46dde9368f75013b2383c24d4c8a11763ac8e31e.tar.bz2
exchange-46dde9368f75013b2383c24d4c8a11763ac8e31e.zip
implement i18n lookup logic for #6458
Diffstat (limited to 'src/include/taler_util.h')
-rw-r--r--src/include/taler_util.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
index 1d1c01eaf..2a64fe8e9 100644
--- a/src/include/taler_util.h
+++ b/src/include/taler_util.h
@@ -185,6 +185,22 @@ TALER_urlencode (const char *s);
/**
+ * Check if @a lang matches the @a language_pattern, and if so with
+ * which preference.
+ * See also: https://tools.ietf.org/html/rfc7231#section-5.3.1
+ *
+ * @param language_pattern a language preferences string
+ * like "fr-CH, fr;q=0.9, en;q=0.8, *;q=0.1"
+ * @param lang the 2-digit language to match
+ * @return q-weight given for @a lang in @a language_pattern, 1.0 if no weights are given;
+ * 0 if @a lang is not in @a language_pattern
+ */
+double
+TALER_language_matches (const char *language_pattern,
+ const char *lang);
+
+
+/**
* Find out if an MHD connection is using HTTPS (either
* directly or via proxy).
*