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)
setting a new locale for the WebViewerExample
shazia
<p class='bbc_left'>Hi,<br />
<br />
im trying to use the french locale for the WebViewerExample.<br />
<br />
In web.xml i have set:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<context-param>
<param-name>BIRT_VIEWER_LOCALE</param-name>
<param-value>fr_FR</param-value>
</context-param></pre></p>
<br />
But this doesnt work. But if i put __locale=fr_FR in the report-url as a GET-paramter the language works. I cant see what im doing wrong ?
Find more posts tagged with
Comments
JasonW
Create a blank test report with only one label. In the labels onCreate script add this:
this.text = reportContext.getLocale();
Run the report in the viewer. Does it show fr_FR locale?
Jason
shazia
Hi JasonW,
thanks for your help.
When i run the blank report its label says: en_US
If i run with the Get-parameter &__locale=fr_FR then it says: fr_FR
Seems like the BIRT_VIEWER_LOCALE in web.xml is not working
CBR
The BIRT Viewer locale parameter is a fallback. It is very unlikely that it is ever beeing used.
WebViewer autodetects the locale in the following ways:
1) Set locale depending on the locale of the browser that is accessing the webviewer (Your browser always sents locale information with every request). The webviewer application is using this locale.
2) If 1) fails it tries to detect the server locale on which the webviewer is running.
3) If 1) 2) are failing the parameter value gets used.
--> The WebViewer locale is not used very often because 1 und 2 have to fail before it is even considering to use its value.
The url parameter is the best option you have when using the webviewer. Another option would be to download the sources and manually change it in the code.