View unanswered posts | View active topics It is currently Wed Mar 01, 2017 11:55 pm



Reply to topic  [ 8 posts ] 
 Arabic Locale is not displayed correctly 
Author Message

Joined: Tue Jan 10, 2012 12:13 pm
Posts: 3
Post Arabic Locale is not displayed correctly
This is the first time for me in this forum, so hello out there!

Heres my problem:

It seems as if MigLayout does not handle locale "ar" (arabian) correctly. A section in a german locale looks like this:

Image

using the following code:
Code:
form.setText("test");
final Composite parent = form.getBody();
parent.setLayout(new MigLayout("wrap 2"));
Label label = new Label(parent, SWT.NONE);
label.setText("Test:");
Text text = new Text(parent, SWT.BORDER);


The same code in locale ar produces

Image

but should look like this:

Image

which is correctly displayed using a Gridlayout:
Code:
form.setText("test");
final Composite parent = form.getBody();
parent.setLayout(new GridLayout(2, false));
Label label = new Label(parent, SWT.NONE);
label.setText("Test:");
Text text = new Text(parent, SWT.BORDER);


Is there a way to fix that?

If you need a runnable program you can easily take
one of the example program from miglayout. The Problem here is the same!

Thanks in advance


Thu Jan 19, 2012 1:19 am
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Arabic Locale is not displayed correctly
Thanks, that looks like a bug.

It is put in the work queue.

Cheers,
Mikael


Thu Jan 19, 2012 11:34 am
Profile WWW

Joined: Tue Jan 10, 2012 12:13 pm
Posts: 3
Post Re: Arabic Locale is not displayed correctly
can you maybe give us a period or date in between that is fixed (is it days months or can't you tell)

Thanks for your reply


Fri Jan 20, 2012 11:22 am
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Arabic Locale is not displayed correctly
I really can't promise anything but I'll try to fix it within a couple of weeks. If you are in more dire need of the fix the source code is available. If you find the fix I will integrate it asap of course.

Cheers,
Mikael


Fri Jan 20, 2012 1:18 pm
Profile WWW

Joined: Tue Jan 10, 2012 12:13 pm
Posts: 3
Post Re: Arabic Locale is not displayed correctly
Any news about this issue?


Tue Mar 20, 2012 2:50 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Arabic Locale is not displayed correctly
Hello,

Unfortunately we haven't had time for this project for a while. But it's still in the queue and not forgotten.

Thanks,
Mikael


Wed Mar 21, 2012 4:09 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Arabic Locale is not displayed correctly
Hello again,

If you start the shell with

new Shell(SWT.RIGHT_TO_LEFT)

Everything seams to work.

SWT (and Swing) does not pick up the orientation from the Locale. I have verified this. However, it works ok for both SWT and Swing if set manually.

Cheers,
Mikael


Thu Mar 22, 2012 10:43 pm
Profile WWW

Joined: Wed Jan 18, 2012 10:52 pm
Posts: 1
Post Re: Arabic Locale is not displayed correctly
Hi,

new Shell(SWT.RIGHT_TO_LEFT) didn't help for us. We debuged the rtl layouting and figured out that first miglayout layouts the componentes from right to left and then swt also layouts the components from right to left, so finally the components are now left to right again. Our solution to solve this problem is to change
the isLeftToRight() in net.miginfocom.swt.SwtContainerWrapper to always return true.

Code:
 
net.miginfocom.swt.SwtContainerWrapper

  public final boolean isLeftToRight() {
    // return (((Composite) getComponent()).getStyle() & SWT.LEFT_TO_RIGHT) > 0;
    return true; // swt renders rtl at its own
  }


Best regards

Stefan


Tue Jun 26, 2012 12:20 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.