Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 1 Monat
Letzter Beitrag:
vor 5 Jahren, 1 Monat
Beteiligte Autoren:
DerekT, Fabrice Harari, Marc De Swert

Dialog and multi lingual

Startbeitrag von DerekT am 15.07.2013 10:07

WD 17
I have needed to apply a second language (American) to my project - used only for input/display of date fields.

Problem I have come across is with Dialog popups - tried a couple of different methods but still get the error....
Snippet of code

lsMessage is string = StringBuild("%1 (%2)",DateToString(ldHolidayDate,maskSystemDate),lsDescription)

Dialog("Remove %1",lsMessage,cmbCountryList..DisplayedValue)

If the 'Nation' is English (default) then the dialogue box displays all infomation correctly.

If, during login, the 'Nation' is changed to American then the dialog popup displays but without any text - even the button caption are removed.
In both cases the content of lsMessage, which I send to Dialog, is correctly formatted.

Any help, thoughts appreciated - I have quite a lot of 'Dialog' messages that will need changing if this is a bug



mayby first save the actual language

SavedLanguage = Nation()

then switch to American

do your stuff

and go back to original
Nation = SavedLanguage

Marc :xcool:

von Marc De Swert - am 15.07.2013 10:35
Hi Derek

by default, the DIALOG window itself contains only 2 languages: FR and UK... So you have to make sure that the windows are included in your project (apply the theme to dialog windows option in project description), and after that, they are nearly regular windows where you can enter and set the US language too

Best regards

von Fabrice Harari - am 15.07.2013 12:56
Hi Fabrice
I had already included the windows as you suggested but before I added the second country.
Checked out your suggestion - unfortunately WD had placed and 'American(3)' option for the text control and the button caption.
All 3 (English, French and American) contained identical default entries.
Seems that the dialog box is not using anything other than the 2 it started out with - as you know this is a completely 'black box' with no code available to investigate.

Plan 1 - I am going to try it by temporarily changing to French to see if the message appears.

Plan 2 - Delete the Dialog and Message windows and then reinstall them from 'Project Description' to see if it works when the three languages are already defined for the project.

von DerekT - am 15.07.2013 18:05

Re: Dialog and multi lingual [SOLVED]

My bad as it turns out.
I had concentrated on the 'Dialog' window - what I needed to check was the 'Dialog' wizard.

When adding American to the languages of the project WD kindly went through and added captions to all existing controls.
OK - guess I am fortunate that I added American as captions tend to be the same.

For 'Dialog' however WD does nothing so all buttons\captions were blank - exactly what I was seeing.
Having now gone through and updated all secondary language caption\buttons everything works as expected.

von DerekT - am 21.07.2013 11:22
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.