|
| Switching between languages WD 20 |
| Iniciado por guest, 19,may. 2016 11:09 - 8 respuestas |
| |
| | | |
|
| |
| Publicado el 19,mayo 2016 - 11:09 |
Hi all,
I am currently working on a project which supports multi language English and Arabic...I designed a form for entering some datas ..I need to enter datas parallally on another form in second language.. I will explain in detail.. From the main window itself,program receives the user option that on which language to continue ...so the further forms will change language accordingly using the following code PROCEDURE Changelanguagesettings() IF gnLanguage=1 THEN Nation(nationEnglish) ChangeCharset(charsetAnsi,languageEnglish) ChangeKeyboard(languageEnglish)
ELSE Nation(nationArabic) ChangeCharset(charsetArabic,languageArabic) ChangeKeyboard(languageArabic)
END
so the data entry form will appear in arabic if i choose 'gnlanguage' as 2..In that form i am again giving an option to switch language to enter data..If user select switch language, a new form will be opened with following end of initialisation code..
IF gnLanguage=1 THEN gnLanguage=2 ELSE gnLanguage=1 END Changelanguagesettings()
so that user can enter datas in English there..
and also on closing this form again switch language to previous .. Everything works perfect..but on switching to second form ,the language settings of the current also changes to that, So that already filled edit controls resets its values.. What i want is User can enter data PARALLALLY on both forms....ie Arabic in first form and English in second form OR viceversa.ie switching language should affect only individual forms not all..when control goes to second form the language change should happen only there and moving on to the first form langauge supported there should be the old one.
In short changelanguage settings to be affected to newly opened form only ..not all windows..Previously opened windows to be continued in old languagesettings..
In the image attached you can see both forms 1 and 2 changes language to English..
Help Plz [attachment 1996 pic2.jpg] |
| |
| |
| | | |
|
| | |
| |
| Publicado el 20,mayo 2016 - 14:33 |
Hi Sara,
What you are describing is the normal behavior of the languages functions. You may ask PCSoft for an improvement/option, but as I've never seen anybody asking for that in 20+ years, I wouldn't hold my breath if I were you...
So in order wot work around the problem, I have 2 ideas. If the first one doesn't work, the second will: 1. use the When taking Focus area of each window to change the language to what you need in that window.
if that's not enough, then you'll need to restart your exe in a special mode, with a command line making it open only the desired window in the desired language. This way, you have 2 exe running at the same time, each in one language. It's up to you to decide what to do in the second exe when closing the window.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 20,mayo 2016 - 15:28 |
Sara,
did you check this setting. It looks like it does exactly what you want.
Quote "The change will be effective:•WinDev immediately if "Change language immediately after the call to Nation" is selected in the "Advanced" tab of the project description. If this option is not checked, the change of language will be performed when the next window is opened. " |
| |
| |
| | | |
|
| | |
| |
| Publicado el 20,mayo 2016 - 15:33 |
Option 3, if you have WDMSG.
Extract all texts with WDMSG. If you use the FIC extension for the output file, you will get a very useable Hyperfile-file, with the window and controlname on every record. Then on opening of the window you can translate the the window yourself, by reading this file and change captions and so on
More or less what the WD framework does behind the scenes. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,mayo 2016 - 06:31 |
Hi Arie
Thanks for your reply,,
I have checked that settings already..It wont give the result as i expect..By that setting ,i can enter data in another language, but the text for the controls remains in the previous language... I didnt check option3
Regards Sara |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,mayo 2016 - 06:33 |
Mr,Fabrice Herrari,, Thank you for your kind reply..
Can you explain in detail how it will workout?
Regards, Sara |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,mayo 2016 - 12:41 |
Sara,
do you use the Nation() function in the opening of the window? I think you have to set the language BEFORE opening the new window. I did a little test and it seems to work thaat way. I also use this for reports. Where a report is printed depeding on the choosen customer (let's say to print an invoice in the customers own language). |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,mayo 2016 - 15:53 |
Hi Sara,
I'm not sure what else to say. Maybe you can ask questions about what you did not understand in my previous post. The principle is:
You exe accepts parameters in its command line. These parameters will contain the window name and it's parameters If you receive that in your exe, then you directly open that window (instead of the regular first one) with the parameters you received.
At that point, one of the parameters is of course the display/input language, and that means that you can open any window of your application in any language, as a standalone exe.
So you have your regular window in your regular program, and you want to open the same one in the other language, you just start a second instance of your program with the appropriate parameters.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,mayo 2016 - 11:08 |
Hi Sara,
Not sure, but this may work: Use Nation() to change language during the windows declaration. Next refresh the window to the new language using the Use() function and after that reset the language again without refreshing the window so the rest of the application remains in the previous language.
This should alter the language settings of that window only. Not sure about it, but it may work.
I believe there is also an option on edit controls (might be an attribute) to set the input language and force right to left writing. Something like (EditControl..RightToLeft = True) This might give you the option to only modify the language setting for a single control instead of a whole window.
I hope this may work for you!
Bye,
Peter Holemans |
| |
| |
| | | |
|
| | | | |
| | |
|