Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Foreign Languages - For FileSel, PromptOK, and other
icon2.gif  Foreign Languages - For FileSel, PromptOK, and other [message #33061] Tue, 05 July 2011 17:55 Go to next message
silverx is currently offline  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 #33063 is a reply to message #33061] Tue, 05 July 2011 19:09 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi silverx,

I think you overlooked U++ has a nice internationalization system Cool All the dialogues etc. are already translated. There is about 15 languages available now it is quite simple add more. Also, any U++ application can be translated at run-time and Theide provides tools to synchronize such run-time translation with .t files in the package. Have a look at the corresponding documentation Wink

Best regards,
Honza
icon4.gif  Re: Foreign Languages - For FileSel, PromptOK, and other [message #33067 is a reply to message #33063] Tue, 05 July 2011 21:36 Go to previous messageGo to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
Thanks for the response.

I did read what you had and tried to follow an example. So far I have not done the change of language yet. I do have a menu item as below. The second line for Russian doesn't have that when I run the program it has funny characters. It needs to display as below in Russian and funny characters. Any help on this?

It is not the only item that I will need to have it display based upon unicode from a file, or in this case where I have actually typed in Russian.

bar.Add("English", THISBACK(BLENGLISH)).Check(BLEeX);
bar.Add("Русский", THISBACK(BLRUSSIAN)).Check(BLReX);


I have attached my code for any help on this. Once I get it done, I will post it back here so hopefully someone will but it in examples so others will be able to use it.

David
Re: Foreign Languages - For FileSel, PromptOK, and other [message #33072 is a reply to message #33067] Tue, 05 July 2011 22:53 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Go to previous message
silverx is currently offline  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.

Previous Topic: SQL query generator
Next Topic: Block comment key short cut
Goto Forum:
  


Current Time: Thu Mar 28 13:38:57 CET 2024

Total time taken to generate the page: 0.01238 seconds