switching automatically to language in Form Runner

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

switching automatically to language in Form Runner

bgawel

Hi,

 

It is possible to tell Form Runner to display a form (and to work) for a particular language without switching manually to this language?

Let's say I have a form that supports en and fr, the default language is en but for some users I would like to display a form in fr without forcing them to switch to fr manually.

 

--

Regards,

Bartek

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
 
 
Reply | Threaded
Open this post in threaded view
|

RE: switching automatically to language in Form Runner

bgawel

Hi again,

 

Maybe I will be even more specific:

1)      I created a form with Form Builder (http://demo.orbeon.com/) that supports en and fr.

2)      With an option Open Published Form New Page I opened the form, switched to fr and saved.

3)      On the Form Summary Page I opened an instance of the form created in 2. Instead of fr the language is set to en. If the instance was created for fr, why in the edit mode is it set to en?

 

--

Regards,

Bartek

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: Thursday, April 25, 2013 4:39 PM
To: [hidden email]
Subject: [orbeon] switching automatically to language in Form Runner

 

Hi,

 

It is possible to tell Form Runner to display a form (and to work) for a particular language without switching manually to this language?

Let's say I have a form that supports en and fr, the default language is en but for some users I would like to display a form in fr without forcing them to switch to fr manually.

 

--

Regards,

Bartek


 
 

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
 
 
Reply | Threaded
Open this post in threaded view
|

RE: switching automatically to language in Form Runner

Alessandro  Vernet
Administrator
Hi Bartek,

The language is stored in the session, once a choice has been made by the user. You can also set it when opening the form by adding the fr-language request parameter. You can find the code where this logic is implemented in:

https://github.com/orbeon/orbeon-forms/blob/4.1-ce/src/main/scala/org/orbeon/oxf/fr/FormRunner.scala#L393

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet