T
Terry IT
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
printf("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.
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 char str[1000] with wchar str[1000] and printf with
wprintf and reading string with wscanf work or is there something
else along with wscanf , wprintf to be done ? .
I fail to understand the relevance of wcstombs_s, _wcstombs_s_l . Why
are these even required ? i have everything in wscanf and wprintf.
What do you guys use or recommend in such situations or how to design
such tasks ?
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
printf("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.
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 char str[1000] with wchar str[1000] and printf with
wprintf and reading string with wscanf work or is there something
else along with wscanf , wprintf to be done ? .
I fail to understand the relevance of wcstombs_s, _wcstombs_s_l . Why
are these even required ? i have everything in wscanf and wprintf.
What do you guys use or recommend in such situations or how to design
such tasks ?