Skip to main content



      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 04:25 Go to next message
Eclipse UserFriend
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 14:37 Go to previous messageGo to next message
Eclipse UserFriend
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 03:09 Go to previous message
Eclipse UserFriend
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: Sat May 10 22:13:39 EDT 2025

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

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

Back to the top