Home » Community » Newbie corner » Foreign Languages - For FileSel, PromptOK, and other
Foreign Languages - For FileSel, PromptOK, and other [message #33061] |
Tue, 05 July 2011 17:55 |
silverx
Messages: 62 Registered: March 2011
|
Member |
|
|
I am working on a program where the user can change the language they are using, as a menu item. So they can change to/from English, Russian, and hopefully later into French, German, Spanish, and others.
This way someone from another country could also use the program.
I have been able to change my menu items into Russian, and the labels ok, by reassigning the labels and that.
The problem comes in with the FileSel, and PromptOK, and other such build in features. Is there a way to have them display the Russian or other language for the items on it in another language, and be able to switch it under program control?
|
|
|
|
|
Re: Foreign Languages - For FileSel, PromptOK, and other [message #33072 is a reply to message #33067] |
Tue, 05 July 2011 22:53 |
|
I tried your example and it displays the Russian string correctly. I think the problem is in your compiler, you are using MSVC, right? I remember people mentioning some trouble with encoding, try to search the forum, there should be solution somewhere here.
I should warn you that the language switching will probably not work as you expected it (or as most people expect it to work). The catch is that there is no simple way to switch all the texts on GUI elements that are already created. The best solution in most cases is to require restarting the application to change the language. Sometimes it is possible to just save the GUI state, close it and reopen without closing the entire application, but it requires some extra coding (not too much).
Honza
|
|
|
Re: Foreign Languages - For FileSel, PromptOK, and other [message #33099 is a reply to message #33072] |
Wed, 06 July 2011 19:46 |
silverx
Messages: 62 Registered: March 2011
|
Member |
|
|
Thanks for the information.
Yes, I am using windows, as the target PC will all be running windows in one form or another.
I did try lots of things. And as you say you have to close and then reopen to get it to change it. At best, I will use my own coding to change all of the stuff on my window to which every language I want, and set the language to be the other language when I use the filesel part of it. If you do open before you change the language, then the left hand side where it has the video, my documents, and that stays in the original language, until you close and reopen the program.
Only a small number of people will notice that, as most of the time they will use it after they change the language to what they want it to be. I change it between mostly for testing purposes.
I do have to change the PromptOK messages, and they will just have to deal with it saying OK instead of what they use in their own language.
I will take a back up copy of it right now, without the promptok changes, and will post it if anyone is interested in seeing how it works. I still have lots more to go on the program, but the language part is working as best I can get it for now.
|
|
|
Goto Forum:
Current Time: Sun May 19 16:20:39 CEST 2024
Total time taken to generate the page: 0.00803 seconds
|