Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP Locale translation of MessageBox buttons(How to translate RAP MessageBox buttons - Cancel, Retry etc.)
RAP Locale translation of MessageBox buttons [message #1712070] Wed, 21 October 2015 08:22 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
When using a MessageBox in RAP, is there a method to translate the caption of the buttons, such as Cancel or Retry etc.?

style = SWT.ICON_QUESTION|SWT.OK|SWT.CANCEL;

MessageBox msgBox = new MessageBox(useShell, style);



---
Just because you can doesn't mean you should
Re: RAP Locale translation of MessageBox buttons [message #1712151 is a reply to message #1712070] Wed, 21 October 2015 14:38 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
HI, you have to use Babel fragments, it has been explained lots of times in this forum, use the search function.

Maybe it would be useful if the RAP team added a small paragraph about the Babel project in https://www.eclipse.org/rap/developers-guide/devguide.php?topic=internationalization.html&version=3.0 .
Re: RAP Locale translation of MessageBox buttons [message #1712158 is a reply to message #1712070] Wed, 21 October 2015 15:01 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi John,
all MessageDialog translatable messages like Cancel or Retry are located
in org.eclipse.swt.internal.SWTMessages.properties resource bundle.
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Locale translation of MessageBox buttons [message #1712159 is a reply to message #1712158] Wed, 21 October 2015 15:07 Go to previous messageGo to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
Thanks Alex and Ivan.
Is Babel the correct approach for this then? Perhaps this is not just for RAP... even in SWT, how would you normally provide translations for these standard strings?
Can you simply insert org.eclipse.swt.internal.SWTMessages_fr.properties files for French etc.?


---
Just because you can doesn't mean you should
Re: RAP Locale translation of MessageBox buttons [message #1712363 is a reply to message #1712159] Fri, 23 October 2015 10:05 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
They way Ivan is suggesting to translate your message, (if I understand correctly, please correct me if I'm wrong) is to create OSGi fragments that will replace the default messages, it is explained here : https://www.eclipse.org/rap/developers-guide/devguide.php?topic=internationalization.html&version=3.0#messages .

This is already done by Babel. To replace every Eclipse/SWT/RWT/CDO/etc. message to a specific language refer to these topics for more guidance : https://www.eclipse.org/forums/index.php/m/1602049/?srch=babel#msg_1602049 and https://www.eclipse.org/forums/index.php/m/1404102/?srch=babel#msg_1404102 .

Re: RAP Locale translation of MessageBox buttons [message #1713614 is a reply to message #1712363] Thu, 05 November 2015 14:05 Go to previous message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
Been a while getting round to looking at this again, but thank-you all for your help.
I have used the pre-translated JARs for RAP/RWT from Babel, and they are working very well - just included them all (46 languages?) in my Target, and included them in the RunConfig (as well as my config.ini for WAR builds), and it all works perfectly!
Great stuff!


---
Just because you can doesn't mean you should
Previous Topic:Problem with (my first) RAP Workbench Application
Next Topic:org.eclipse.equinox.http.servlet 1.2.0 not compatible to Tomcat6
Goto Forum:
  


Current Time: Thu Apr 25 06:48:44 GMT 2024

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

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

Back to the top