Fw: Will strerror messages be automatically translated...
Carlos O'Donell
carlos@systemhalted.org
Sat Aug 9 14:44:00 GMT 2014
On Fri, Aug 8, 2014 at 6:33 PM, frank ernest <doark@mail.com> wrote:
> Will strerror messages be automatically translated or do I have to call gettext on them?
> In other words:
> err_str = strerror(errno);
> fprintf(stderr, err_str );
> OR
> err_str = strerror(errno);
> fprintf(stderr, gettext(err_str) );
They will be automatically translated. You do not need to call gettext
on them. However, you *do* need to call `setlocale(LC_ALL, "");' to
cause the application to load the appropriate locale values from the
environment variables, otherwise you will just have the C locale.
Cheers,
Carlos.
More information about the Libc-help
mailing list