right-to-left

92 views
Skip to first unread message

Dawn Borg Costanzi

unread,
May 10, 2013, 9:43:53 AM5/10/13
to google-we...@googlegroups.com
Hi everyone,

I've created a number of widgets to make an online questionnaire. Can anyone tell me whether there is an easy way to have a mirror-image of the widget, for right-to-left language support?

Thanks,
Dawn

Mohammad Al-Quraian

unread,
May 11, 2013, 6:02:02 AM5/11/13
to google-we...@googlegroups.com
Have you tested that by adding a locale into your .xml module file? You can add the Arabic locale like this:
<extend-property name="locale" values="ar" />

Then when you change the locale you would find that GWT does rearrange the widgets as a mirror-image, so if you have a horizontal panel with a label on the left then a text box on the right, after switching to a RTL locale the label would be on the right and the text box on the left, all done magically for you by GWT.

Dawn Borg Costanzi

unread,
May 17, 2013, 4:56:28 AM5/17/13
to google-web-toolkit
Yes, I have tried this. I added the line: <extend-property name="locale" values="ar"/> in my .xml module file. However when I added '&locale=ar' to my URL (in development mode), I got the same layout, just the text was different.

Am I missing something maybe?


--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/gdFBwCfmc5E/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Dawn Borg Costanzi

unread,
May 17, 2013, 6:23:21 AM5/17/13
to google-web-toolkit
I should also mention that i am using Layout Panels, not sure if this makes a difference...

Andrei

unread,
May 17, 2013, 11:35:35 AM5/17/13
to google-we...@googlegroups.com
If you set positions in absolute numbers (LayoutPanel), these positions will not change when you switch the locale.

Are you using one of standard GWT themes? They come with a RTL version. If you add your own styles, however, you have to create RTL versions of these styles yourself.

Dawn Borg Costanzi

unread,
May 17, 2013, 11:38:37 AM5/17/13
to google-web-toolkit
Yes, I'm using a GWT standard theme, but I was hoping that the layout would reverse automatically depending on the locale (since I have an application which must be available in 6 different locales, mixed RTL and LTR). I was not aware that the absolute positioning of the Layout Panel would prevent this... if anyone knows of a 'quick fix' for this it would be very helpful! Thanks :)


On Fri, May 17, 2013 at 5:35 PM, Andrei <vol...@spiraluniverse.com> wrote:
If you set positions in absolute numbers (LayoutPanel), these positions will not change when you switch the locale.

Are you using one of standard GWT themes? They come with a RTL version. If you add your own styles, however, you have to create RTL versions of these styles yourself.

--
Reply all
Reply to author
Forward
0 new messages