Internationalization on Bonita 6

1
0
-1

Hi,

I can't seem to find any internationalization possibilities on Bonita 6. I remember how to do it on 5.10 and it was pretty obvious but I cannot find it on v6. Am I missing something?

Thanks,

Florent

Comments

Submitted by ttoine on Thu, 01/16/2014 - 15:48

in the forms ? in the portal ? in the studio ? what do you mean with internationalization ?

Submitted by florentj on Fri, 01/17/2014 - 09:47

What I mean is the equivalent of this http://documentation.bonitasoft.com/5x/bos-58/web-applications/choose-la... in version 6

In version 5, you could define your forms so that they can be displayed in different language. I cannot find the option or any documentation for version 6.

- See more at: http://community.bonitasoft.com/answers/internationalization-bonita-6#st...
Submitted by ttoine on Fri, 08/08/2014 - 10:52

Yes, this is not available for v6. the workaround explained by Sean is one of the way to do it at the moment.

Submitted by Sean McP on Fri, 08/08/2014 - 17:25

ttoine,

you say this is one way to do it, what are the others? Is there a best practice method for Community Edition?

How would you do Internationalization for Community Edition?

thanks and regards Seán

Submitted by ttoine on Mon, 08/11/2014 - 09:56

It is not only for Community Edition. In SP, this is the same. An other method is to use a text file (json, xml) and some javascript in the header of the form. This will avoid too many connection to the database.

Submitted by florentj on Mon, 08/11/2014 - 10:03

Hi,

Thanks Sean for the answer. Another way to do it is also to use normal java internationalization properties files. In the end that's what we used at the time of this questions. The only (huge) issue we had was some classloading. We could not deploy the language files with the process but had to deploy them directly in Tomcat lib folder (or something like that). So we had to restart tomcat anytime we wanted to make change to the translation files. In a way your DB-based solution would solve this issue at the cost of DB-calls...

Florent

Submitted by Sean McP on Thu, 08/28/2014 - 15:40

Hi Florent,

Thanks for the thanks, I've got it working now, funny how you can ask a question and then everything falls into place...or is that just annoying...

thanks and regards Seán

1 answer

1
+1
-1

Hi florentj,

I also want to internationalize my application but according to the documentation it is not available in Community edition 6.x.

The way I'm doing it is as follows:

1) Create external databases: yourcompany_yourapplication_Language_Country where language and Country are according to Locale standards.

i.e companyABC_applPurchasing_en_US

with two columns: id and text

in each table add your id and text accordingly.

2) Add a Service Task to every procedure to get the "forced" locale from a parameter text file (via a connector), if the locale is not forced then I get the locale from the system and use that, for example.

Locale locale = Locale.getDefault();
String lang = locale.getDisplayLanguage();
String country = locale.getDisplayCountry();

3) For each and every label or text string in the application I define a variable which will be populated as follows:

id=id_of_ofText_I_need; readFromDB = "companyABC_applPurchasing_" +lang+"_"+country; sqlQuery = "select text from "+readfromDB+" where id = "+id;

and then save the return into the variable...

Not as good as true internationalization integration but works all the same.

Hope this helps, regards Seán

Notifications