I created localized fr_FR_Locale.mo files from fr_FR.po .
I used the sgettext, msginit and msgfmt command from the terminal.
I changed my local to French (fr_FR.utf8) .
But when I execute my code, I do not get what I expect. Here is my call:
setlocale(LC_ALL,"");
bindtextdomain("locale",LC_INTL);
bind_textdomain_codeset("locale", "UTF-8");
textdomain("locale");
printf(gettext("Hello world!"));
Here the conclusion should be something not English , but I get the same English words .
source
share