Best way to develop multi language application

View and download documents on various topics e.g. Configuring Ebase Xi under different environmental setups

Moderators: Jon, Steve, Ian, Dave

cagabit
Ebase User
Posts: 11
Joined: Fri Nov 20, 2015 6:10 pm

Best way to develop multi language application

#1

Postby cagabit » Wed Dec 09, 2015 10:23 pm

Hi,

Trying to develop a multi language application on v5.

Understand setting the default lang, and its texts, translate system or form's texts etc.

Even can change the form's lang by

Code: Select all

form.language = "ES";
Also when calling a form using LANGUAGE parameter in URL.

But how to make this change stable, as soon as that session lasts ? I mean think of if a application; when logging in you choose your language, and when entered the password and entered, that language stays set.

I am asking if there is a good way that system supported ?

Thanks for all comments, [/code]
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Dec 10, 2015 9:34 am

There isn't anything built in that makes the language apply to an entire session, but you could add it by saving the language as a session variable and then checking it with each new form. Something like this..

Setting language initially in a session variable:

Code: Select all

client.request.session.setAttribute("LANGUAGE", "ES");
Checking it for each subsequent form. I suggest doing this in a before form event script:

Code: Select all

var lang =  client.request.session.getAttribute("LANGUAGE");
if (lang)
  form.language = lang;
0 x


Who is online

Users browsing this forum: No registered users and 17 guests