Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Scout Neon i18n: problem with texts at JavaScript level(Texts: ui.NumRowsSelected, ui.NumRowsFiltered, ...)
Scout Neon i18n: problem with texts at JavaScript level [message #1740751] Thu, 18 August 2016 07:03 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1250
Registered: October 2011
Senior Member
In a simple Scout Application (I have taken the demo Contacts application), how does internationalization support works?

I have set the language configuration in my browser (Chrome) to prefer French

I now have the feeling the texts I have defined are translated and that the texts that should come from Scout are not.


This is strange because the corresponded texts are provided by Scout:
 <org.eclipse.scout.rt.ui.html jar>/org/eclipse/scout/rt/ui/html/texts/

What I am missing?
  • Attachment: TablePage.png
    (Size: 12.03KB, Downloaded 197 times)
Re: Scout Neon i18n: problem with texts at JavaScript level [message #1740808 is a reply to message #1740751] Thu, 18 August 2016 16:14 Go to previous message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 92
Registered: November 2010
The texts you have marked with red are so-called "UI texts". Unlike the green texts (which belong to the table and are sent to the UI along the table itself), they are collected when the UI session starts and are sent to the UI in the startup response (the first request to /json).

The UI texts are collected for a specific locale. This locale is taken from the ClientSession. Depending on the implementation (e.g. in execLoad), the locale can be set statically or by reading some user settings from a database. By default, the ClientSession's locale is read from the first HttpRequest's headers.

Note that this means that simply reloading the page after changing the browser's locale is not enough! You will get the same ClientSession as before , and with the same locale as well. You have to logout and login again to create a new ClientSession.

I suggest you first check the HTTP request headers (and the response) using the browser's dev tools. I tried it with the contacts application at and it seemed to be working correctly:


If this looks alright, make some breakpoints in the Java code to check the locale at these points:

  • org.eclipse.scout.rt.ui.html.UiSession.getTextMap(Locale)
  • org.eclipse.scout.rt.ui.html.UiSession.createAndStartClientSession(Locale, UserAgent, Map<String, String>)

  • Attachment: locale.png
    (Size: 41.04KB, Downloaded 169 times)
Previous Topic:Login Form
Next Topic:[Neon] scout-helloworld-app: default users?
Goto Forum:

Current Time: Sat Apr 21 00:27:34 GMT 2018

Powered by FUDForum. Page generated in 0.01941 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software