Multilingual forms | JS with SO and function()

mtas23

23-04-2019

Hi

I'm new to the forum and quite new in creating LiveCycle forms using ES3. Now I'm stuck and very greatful if somebody could assist me to get my form running.

I tried to adapt the following instructions LiveCycle Blog: Mehrsprachige Formulare //Multilingual forms to my form, however, nothing happens. What I'm trying to achieve is actually pretty simple, i.e. a form which language can be changed by choosing the language from a Dropdown.

My hierarchy:

--> Script Object (SO): from1.variables[0].Sprachen

--> Dropdown: form1.InputOfferterstellung.Dropdown

--> Textboxes: form1.InputOfferterstellung.Subform_GenerelleInfo. [...], etc.

--> Dropdown List Items: Deutsch, English, Italiano (no specified item values)

My JavaScript for SO:

function Sprache_ändern(L01, L02, L03)

{

  xfa.form.form1.InputOffertenerstellung.Subform_GenerelleInfo.OffertID.caption.value.text.value = L01;

  xfa.form.form1.InputOffertenerstellung.Subform_GenerelleInfo.ProjektNr.caption.value.text.value = L02;

  xfa.form.form1.InputOffertenerstellung.Subform_GenerelleInfo.ArtderOfferte.caption.value.text.value = L03;

}

function DeutschCaption()

{

  Sprachen.Sprache_ändern("Offerten-ID", "Projekt-Nr.", "Art der Offerte");

}

function EnglishCaption()

{

  Sprachen.Sprache_ändern("Quotation ID no.", "Project no.", "Bid type"); 

}

function ItalianoCaption()

{

  Sprachen.Sprache_ändern("Offerta ID no.", "Progetti no.", "Tipo di offerta");

}

My JavaScript in the exit event of the Dropdown:

if(xfa.event.newText == "Deutsch")

{

  xfa.form.form1.Sprachen.DeutschCaption();

}

if(xfa.event.newText == "English")

{

  xfa.form.form1.Sprachen.EnglishCaption();

}

if(xfa.event.newText == "Italiano")

{

  xfa.form.form1.Sprachen.ItalianoCaption();

}

Thank you vermy much for your help!

Regards

Accepted Solutions (0)

Answers (0)