diff options
Diffstat (limited to 'common/i18n.c')
-rw-r--r-- | common/i18n.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/i18n.c b/common/i18n.c index 202d84035..e6d3f5e47 100644 --- a/common/i18n.c +++ b/common/i18n.c @@ -113,3 +113,15 @@ i18n_utf8 (const char *string) i18n_switchback (saved); return result; } + + +/* A variant of gettext which allows to specify the local to use for + translating the message. The function assumes that utf-8 is used + for the encoding. FIXME: The locale back and forth switching is + likely very expensive, thus we should consider to implement our own + cache here. */ +const char * +i18n_localegettext (const char *lc_messages, const char *string) +{ + return _(string); +} |