RTL not working with RAP application [message #1744936] |
Mon, 03 October 2016 07:26 |
|
Hi all,
I'm build a basic application to test tycho build, and, RTL/multi-languages rendering in RAP 3.1.1 .
My dummy application is running on both RAP and RCP thanks to single sourcing.
While both RAP and RCP versions of my application are both rendering some widgets in hebrew (Yes/No, Ok/Cancel, preferences menu), only the RCP application is rendered in Right-To-Left.
Do I have something more to do in RAP to enable RTL?
Any help would be greatly appreciated.
Regards.
PS: I tried to add "-bidi" parameter to my (RAP) web.xml without any effect:
<init-param>
<param-name>commandline</param-name>
<param-value>-registryMultiLanguage -bidi "on=y;textDir=rtl"</param-value>
</init-param>
-
Attachment: rcp.png
(Size: 42.60KB, Downloaded 127 times) -
Attachment: rap.png
(Size: 13.65KB, Downloaded 127 times) -
Attachment: rap.en.png
(Size: 11.81KB, Downloaded 124 times)
|
|
|
|
Re: RTL not working with RAP application [message #1744947 is a reply to message #1744940] |
Mon, 03 October 2016 08:36 |
|
Hi,
That's indeed a workbench application.
As suggested by you, I have added an explicit Style (SWT.RIGHT_TO_LEFT) for the workbench window configurer when locale is "hebrew" and it works !!!
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
private static final String PERSPECTIVE_ID = "example.bundle.perspective";
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
if (Activator.getDefault().getLocaleProvider().getLocale().getLanguage().equals("iw")) { //$NON-NLS-1$
configurer.setShellStyle(SWT.RIGHT_TO_LEFT);
}
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
public String getInitialWindowPerspectiveId() {
return PERSPECTIVE_ID;
}
}
That way, I have RTL only with browser displaying hebrew but LTR for french/english browsers.
Thank you very much for your suggestion that solved the issue.
I'm only wondering why explicit mention of the shell style must be done with RAP while it works without it for RCP.
Regards,
Johann
[Updated on: Mon, 03 October 2016 08:39] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02054 seconds