Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Best practise to dynamically set session language in RAP(Bundles are not loaded with RWT.getLocale())
Best practise to dynamically set session language in RAP [message #1851549] Fri, 08 April 2022 08:25 Go to next message
Sebastian Luhn is currently offline Sebastian LuhnFriend
Messages: 4
Registered: January 2022
Junior Member
We have an RAP application that dynamically switches from the browser language to the user language after login.
This is done via
RWT.setLocale(userLocale);

After that the application starts by calling PlatformUI.createAndRunWorkbench.
However bundles are not loaded with the userLocale but instead with the osgi language (osgi.nl).
The workaround we came up with consits of manually setting this property in combination with RWT.setLocale before creating the Workbench. However this is a global adjusment and could lead to unexcpected behaviour when multible users are logged in simultaneously.

Therefore the question: Is there a more elegant way to switch the language before starting the workbench?

Thanks for the support,
Sebastian
Re: Best practise to dynamically set session language in RAP [message #1851594 is a reply to message #1851549] Sat, 09 April 2022 18:37 Go to previous messageGo to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 160
Registered: February 2013
Senior Member
maybe use
RWT.getUISession().setLocale( locale )



Re: Best practise to dynamically set session language in RAP [message #1851732 is a reply to message #1851594] Thu, 14 April 2022 07:09 Go to previous message
Sebastian Luhn is currently offline Sebastian LuhnFriend
Messages: 4
Registered: January 2022
Junior Member
Hi Dmitry,
thanks for the hint, but RWT.setLocale is just a shortcut for RWT.getUISession().setLocale( locale ) as you can see in the source code:
https://git.eclipse.org/c/rap/org.eclipse.rap.git/tree/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/RWT.java
Therefore, they act the same
Previous Topic:Broken JavaDocs links in online dveloper's guide since RAP 3.15
Next Topic:RAP Chart - dataset.label
Goto Forum:
  


Current Time: Tue Sep 27 18:06:42 GMT 2022

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

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

Back to the top