Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Managing two differents languages in a report
Adamaa Faal
<p>Hello!</p>
<p>I have a report that I want to visualize in 2 languages(french and english)</p>
<p>I wanted to use the visibility on labels with a condition based on the language of the user to display the label with that language but I do not want to do everything twice on my report.</p>
<p>It happens that I saw that you could use a properties file for the translations of words but my problem is that I want this done automatically according to the user language that is already defined in my database, I want to switch the language depending on the language of the user logged on ihub .</p>
<p>any help please.</p>
<p> </p>
<p>Thx,</p>
Find more posts tagged with
Comments
icirillo
<p>Hi Adamaa,</p>
<p> </p>
<p>if I understand correctly you would like the report to detect the language of the user logged into iHub and then to display the report in such language. Is this correct?</p>
Adamaa Faal
<p>Hi Icirillo,</p>
<p>Yes , it's exactly what i want to do.</p>
icirillo
<p>What iHub version you are using?</p>
Adamaa Faal
<p>I'm using the version 16. </p>
icirillo
<p>The behavior you would like to achieve should be achievable by leveraging the standard localization functionality of iHub, the one you mentioned when you talked about "properties file for translations".</p>
<p> </p>
<p>Some documentation can be found here:</p>
<p><a data-ipb='nomediaparse' href='
https://wiki.eclipse.org/BIRT/FAQ/Internationalization'>https://wiki.eclipse.org/BIRT/FAQ/Internationalization</a></p>
;
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub31-dev/ADG-main/index.html#page/ADG/localization.33.03.html#'>http://developer.actuate.com/be/documentation/ihub31-dev/ADG-main/index.html#page/ADG/localization.33.03.html#</a></p>
;
<p> </p>
<p>Please find attached an example. Please deploy it on your iHub as an application. Then execute the report with an en_US user and you will see "Hello". Try to execute the report with a French user (select locale French/France) and you will see "Salut".</p>
Adamaa Faal
<p>the application's uploading has failed, apparently because of the ".project " File. </p>
<p>But i understand the idea. The switch is done in function of the users selected languages.</p>
<p> </p>
<p>I try with one of my reports , I would tell you if I have some worries.</p>
<p> </p>
<p>Thanks a lot.</p>
icirillo
<p>try to import the project in Birt designer and then from there upload it as an application into iHub. You are welcome.</p>
bmark
<p>Hi,</p>
<p> </p>
<p>If you don't want to set the locale by url parameter try to set report locale in the beforeFactory method if the locale differs from the profile settings.</p>
<p> </p>
<p>In example by asking the user with a report param:</p>
<p> </p>
<p>beforeFactory:</p>
<pre class="_prettyXprint">
reportContext.getDesignHandle().setStringProperty("locale", params["ReportLocale"].value);</pre>
<p>You could also execute some detection functions before to get the desired user locale from somewhere and set the value.</p>
<p> </p>
<p>Best regards</p>
<p> </p>
<p>Ben</p>
Adamaa Faal
<p>Hi Ben, </p>
<p>thanks for support, it works well :-D</p>