1 pièce(s) jointe(s)
gettext ne retourne pas la traduction ?
Bonsoir,
j'aimerais rendre mon application facilement traduisible en utilisant la fameuse lib GNU gettext
Voici mon main.cpp
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| #include <Windows.h>
#include "libintl.h"
#include <locale.h>
int showMessageBox(const char* caption, const char* content, UINT type)
{
return MessageBox(nullptr, caption, content, type);
}
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
setlocale(LC_ALL, "fr_FR");
bindtextdomain("messages", "/");
textdomain("messages");
showMessageBox(gettext("Coucou"), gettext("Caption"), MB_ICONASTERISK);
return 0;
} |
Voici mes deux fichiers po et mo
Pièce jointe 155904
Le programme compile correctement. Mais le texte ne se traduis pas. Ai-je fait une erreur ?
Merci à tous