You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although I've added some support for translating the output messages using gettext, I haven't completed the process yet. Now I wonder if a different method should be used. I have used used gettext before with a C program, but not a C++ program. I wonder if there are alternate solutions that should be considered. Does anyone have suggestions about this?
I've done some searching, but haven't found answers yet to how this would be done
Using gettext with a C program, a string would be marked like this:
printf (_("I am %d years old and my zipcode is %d\n"), age, zipcode);
But that wouldn't work with a C++ cout string.
cout << "I am " << age << " years old and my zipcode is " << zipcode;
There would have to be marks around each string within the quotation marks... or would there? I couldn't find any info about it that made sense.
Or maybe implementing tinyformat.h should be an option.
tinyformat.h is a type safe printf replacement library in a single C++ header file. If you've ever wanted printf("%s", s) to just work regardless of the type of s, tinyformat might be for you.
The text was updated successfully, but these errors were encountered:
Although I've added some support for translating the output messages using gettext, I haven't completed the process yet. Now I wonder if a different method should be used. I have used used gettext before with a C program, but not a C++ program. I wonder if there are alternate solutions that should be considered. Does anyone have suggestions about this?
I've done some searching, but haven't found answers yet to how this would be done
Using gettext with a C program, a string would be marked like this:
printf (_("I am %d years old and my zipcode is %d\n"), age, zipcode);
But that wouldn't work with a C++ cout string.
There would have to be marks around each string within the quotation marks... or would there? I couldn't find any info about it that made sense.
Or maybe implementing tinyformat.h should be an option.
The text was updated successfully, but these errors were encountered: