libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MHD can't find MO files


From: silvioprog
Subject: Re: [libmicrohttpd] MHD can't find MO files
Date: Fri, 24 Feb 2017 23:05:36 -0300

On Fri, Feb 24, 2017 at 9:46 PM, Christian Grothoff <address@hidden> wrote:
n 02/24/2017 11:41 PM, silvioprog wrote:
> P.S: Looking at mhd_options.h I found the following comment:
>
> /**
>  * Macro to make it easy to mark text for translation. Note that
>  * we do not actually call gettext() in MHD, but we do make it
>  * easy to create a ".po" file so that applications that do want
>  * to translate error messages can do so.
>  */
> #define _(String) (String)
>
> sorry my ignorance, but, if MHD don't call gettext(), how will it translate
> the massages? o.O

It won't. We just tag them so that applications can choose to translate
them. You have to initialize and call dgettext("libmicrohttpd", s)
inside of your logging callback on all messages/strings you get from
libmicrohttpd (inside the log callback) yourself if you want the
messages translated.

Hm... it makes sense. I need to do new tests to check if it works translating in the final application by itself.

Anyway I'm curious, is there any special reason to MHD not to call bindtextdomain() internally? 🤔 (it seems locale.h/libintl.h is present in all SOs supported by MHD ...)

--
Silvio Clécio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]