Link to home
Start Free TrialLog in
Avatar of Mensana
Mensana

asked on

Switch between languages at run-time?

I’m working on a project that is supposed to work on different markets. I’m using the Unicode programming and stuff like that. As usual I have some questions!
I was able to create some tools that can help me to edit separate Unicode resource files and create extra string tables that can store international text strings. Now I want to know if is there any way I can display my user interface using a particular string table that’ll be determined at run-time based only on the locals settings on the machine where the app is running. I want to know what are the steps that must be followed to construct such an application and what are the settings that has to be done on my Visual C++ 6.0 IDE.
Thanks,
Eddie.
Avatar of akalmani
akalmani

Hi Mensana !!!
     Use AfxSetResourceHandle() for localisation and AfxGetResourceHandle()
ASKER CERTIFIED SOLUTION
Avatar of mikeblas
mikeblas

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mensana

ASKER

Hi Mike,
Thank you for answering my question. Unlike your sample, I didn’t want to switch programmatically to a different locale within my program, but I wanted to be able to display a particular set of strings just by changing the locale for my machine. I knew that when a thread is created, it uses the system default thread locale so I’ve changed the locale before I started the app. However, I didn’t get the right behavior and it was my entire fault. In Control Panel’s Regional Settings I changed the language in “Input Locales” – last tab - instead of “Regional Settings” – first tab.
Now, that I figured this out, everything is working just fine.
Mean time other questions were raised in my head but I was able to solve them using your sample and that’s way I rate your answer as “Excellent”. Thank you again!
Eddie Lascu.