Connecting Tech Pros Worldwide Forums | Help | Site Map

localization issue c++

Terry IT
Guest
 
Posts: n/a
#1: Nov 18 '08
hi,
i've some C and C++ code written. I'll speak about the C++ code
here.

All of the text user interface is with printfs and scanf. They are
all ascii characters. They are working well on english . Now i have to
change these
cout "Select 1 for choosing option billing \n") ; to japanese ,
chinese etc.

One option would be to use GNU gettext but there are issue with GPL
code. So i have to use plain C++.

My idea is to store for each language a prefix code and the string in
seperate file

like for japanese , str_ja
1 "japanse string for choosing optino billing"
2 " japenase optin for chooseing the payment mode"

str_cn similar.


Will replacing the string with wstring and cout with wcout and
reading string with wcin work or is there something else along with
wcout,to be done ? .

I fail to understand the relevance of converting from wstring to
string. Isn't wstring supposed to accomodate strings . Then why do
people do that or the other way round?

What do you guys use or recommend in such situations or how to design
such tasks ?

Closed Thread


Similar C / C++ bytes