How can I translate labels from the Studio when designing a WF

1
0
-1

Hi everybody,

I would like to know how can I translate label (or any other string) on a form, when I created it from the Studio?

Thanks for your response

2 answers

1
0
-1

Yeah but using groovy doesn't work in 7.xx.

Sorry let me be clear here, using Groovy for 7.xx instantiation forms doesn't work as it does in 6, and if you are thinking about going to 7.xx do it the AJAX way. It works.

I would start by doing the tutorial I gave you first, then we'll see about how much code I give out. When I started I pretty much did it all myself (I don't work for nothing :) with some help from others.

Search for i18n and it will tell you what to do for the translate files.

regards
yes, maybe not as much help as you want but...

Give a man a fish, and you feed him for a day;
Show him how to catch fish, and you feed him for a lifetime.

I prefer to show the way...

1
0
-1

You don't say what version of Bonitasoft you are using.

And aren't particularly clear about what you want to achieve, do you want the page to allow translation of a string, or do you want the form to appear in the language of the user?

If the latter then:

In 6 the easy way is to create a Groovy script to read a properties file which can be used in an i18n way. I use this with 6 developments.

In the form widget I then use a expression script to get the text based on a key.

In 7 because forms are separate from near all processing, I have a variable that attaches to a piece of javascript that calls an ajax page to return the i18n text, either from properties files or from database.

If you've not done this before have a look at:

http://www.vogella.com/tutorials/EclipseWTP/article.html

regards

Comments

Submitted by sylvain.jeandroz on Mon, 09/07/2015 - 09:25

Hi,

First, thanks for your response!
Yes I'm sorry my question was not very clear.
I'm using Bonita 6.4, and my goal is to have fields of my forms translated if I switch the UI language.
Your solution about groovy script seems to be a gread idea.
Can you help me by showing me some exemple of using properties file from groovy?

Thanks a lot again and sorry for my bad english

Notifications