We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the solution you'd like support multi-language 支持多种语言
The text was updated successfully, but these errors were encountered:
gettext
// hello.cpp #include <stdio.h> #include <locale.h> #include <libintl.h> #define _(string) gettext (string) #define LOCALEDIR "./locale/" #define PACKAGE "hello" int main(int argc, char* argv[]) { setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); printf(_("hello")); return 0; }
xgettext -a hello.cpp -o hello.po
"Content-Type: text/plain; charset=CHARSET/n" change CHARSET to UTF-8
msgfmt hello.po -o hello.mo
mkdir -p locale/zh_CN/LC_MESSAGES/
cp hello.mo locale/zh_CN/LC_MESSAGES/
g++ hello.cpp ./a.out
Sorry, something went wrong.
No branches or pull requests
Describe the solution you'd like
support multi-language 支持多种语言
The text was updated successfully, but these errors were encountered: