Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-04

LTR or RTL info from users locale settings?

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Does the RTL have any why to notify me if the users locale is LeftToRight or RightToLeft? I'm porting the MiG Layout Manager from Java to Free Pascal for use with fpGUI Toolkit and Lazarus LCL, and need to somehow find this information.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys

No, you can not know by the "normal" locale. You must check to see what is the type of locale:
1. Hebrew
2. Many forms of Arabic (you have more then 6 if I remember correctly)

That's the only way I know to detect if the locale is RightToLeft or LeftToRight.
I started working on something for Lazarus but I accidently deleted it before backup, so you'll have to do your own research (wikipedia and some ISO language code will help).

Ido

Graeme Geldenhuys wrote 19 lines
Hi, Does the RTL have any why to notify me if the users locale is LeftToRight or RightToLeft? I'm porting the MiG Layout Manager from Java to Free Pascal for use with fpGUI Toolkit and Lazarus LCL, and need to somehow find this information. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Graeme Geldenhuys
to ik
ik wrote 7 lines
No, you can not know by the "normal" locale. You must check to see what is the type of locale: 1. Hebrew 2. Many forms of Arabic (you have more then 6 if I remember correctly) That's the only way I know to detect if the locale is RightToLeft or LeftToRight.

Thanks. I'll double check what Java does, seeing that that is the only other framework I know that supports so many platforms and has the direction detection built in.

I started working on something for Lazarus but I accidently deleted it before backup,

Git [http://git-scm.com/] is your friend! ;-)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys
Graeme Geldenhuys wrote 13 lines
On Mon, Apr 6, 2009 at 7:30 PM, ik wrote: > No, you can not know by the "normal" locale. You must check to see what is > the type of locale: > 1. Hebrew > 2. Many forms of Arabic (you have more then 6 if I remember correctly) > > That's the only way I know to detect if the locale is RightToLeft or > LeftToRight. Thanks. I'll double check what Java does, seeing that that is the only other framework I know that supports so many platforms and has the direction detection built in.

Java supports all of Unicode's standards, so they also implement Bidi (I hope one day fpGUI will also support it in a native form)

Show quoted text 20 lines
> I started working on something for Lazarus but I accidently deleted it > before backup, Git [http://git-scm.com/] is your friend! ;-) Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email