Internationalization on Bonita 6

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

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.

  1. 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();
  1. 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

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

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

<p>
	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.</p>
- See more at: http://community.bonitasoft.com/answers/internationalization-bonita-6#sthash.TVmAtz9a.dpuf</div>

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

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

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.

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

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