International Custom Controls. lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- skalogryz · 2009-03-29 13:27 Hello Developers! FPC, Lazarus (LCL) grows popular with every day. Application created with Lazarus are used world-wide. There're two major writing systems in the world left-to-right - European languages and right-to-left: Arabic, Hebrew languages. Some Asian language are traditionally written top-to-bottom and columns go right-to-left, but AFAIK it's not commonly used these days. Anyway, depending on the system language, UI interface also changes. Lazarus components are should check "bidi" property (probably some other system options) to determine the writing direction used in OS by default. Standard controls have no problems with changing text direction. i.e. if right-to-left direction is enabled: * vertical scroll bar of TScrollBox moves to the left side of the form * tabs are drawn from the right to left in TNotebook or TTabControl). * main menu also starts from right side of the window. But how should custom controls render themselves? There are great variety of different kind of custom controls. Should they always render them self the same, no matter what witting direction is, or should they change in some way? AFAIK, Mac OS X does not change controls appearance even if system language is set to right-to-left, but Windows and Linux do. How should custom controls behave? Are there any rules? What's better for the user, whos native language writing direction is right-to-left? Any comments, hints and screenshots are appreciated! ---------------------------------------------------------------------- Zaher · 2009-04-01 16:23 Also Windows not "change controls appearance" for some controls, so i build my own controls (in Delphi), and i am working to move it to Lazarus (may be need a years ), also there is a problem when processing the connecting characters in Arabic language and we must use the OS. I have plan to take  fpgui to make it "right to left" but, Yah we need more free hours ---------------------------------------------------------------------- skalogryz · 2009-04-01 20:12 Quote from: Zaher on April 01, 2009, 06:23:28 pmAlso Windows not "change controls appearance" for some controls, so i build my own controls (in Delphi), Could make some screen shots? To show the difference on how control are drawn, and how they SHOULD be drawn for right-to-left systems. Quote from: Zaher on April 01, 2009, 06:23:28 pmand i am working to move it to Lazarus (may be need a years ), also there is a problem when processing the connecting characters in Arabic language and we must use the OS. when you say Lazarus, do you mean that Lazarus IDE source editor cannot handle Arabic text correctly? ---------------------------------------------------------------------- Zaher · 2009-04-02 15:26 QuoteCould make some screen shots? To show the difference on how control are drawn, and how they SHOULD be drawn for right-to-left systems. Hmm that need some memory callback Quotewhen you say Lazarus, do you mean that Lazarus IDE source editor cannot handle Arabic text correctly? In SynEdit yes as like as Delphi but i have not problem with it at all, you can use it, I have 4 Lazarus application 2 of it use WinCE using Arabic language. ---------------------------------------------------------------------- skalogryz · 2009-04-03 06:06 Quote from: Zaher on April 02, 2009, 05:26:14 pmIn SynEdit yes as like as Delphi but i have not problem with it at all Do you know any IDE, that handles arabic-text correctly? (Visual Studio?) I guess, It's hard to handle mix of arabic (right-to-left) and pascal- code (originally-left-to-right). Or is pascal code also written right- to-left in arabic Lazarus? Zaher, what about TStringGrid in Lazarus? StringGrid (DrawGrid) is not based on any standard system control, it's "custom" control. Should it reverse columns order from left-to-right, to right-to-left? ---------------------------------------------------------------------- Zaher · 2009-04-04 10:55 Visual Studio work fine with RTL reading text but still left align the code, still if mix Arabic and English in same line make confused things, most of programmers write Multi Language so at that we will not have any problems. About TStringGrid, i prefer build new Grid instead of change exist one, but i will look at TStringGrid may be it easy to flip it. check http://wiki.lazarus.freepascal.org/BidiMode ---------------------------------------------------------------------- skalogryz · 2009-04-04 20:17 Quote from: Zaher on April 04, 2009, 12:55:12 pmVisual Studio work fine with RTL reading text but still left align the code, still if mix Arabic and English in same line make confused things, most of programmers write Multi Language so at that we will not have any problems.it's good that developers can handle poor multi-language support. but what about end-users?  Is mixing english and arabic text is a common problem? or is it rare? Quote from: Zaher on April 04, 2009, 12:55:12 pmhttp://wiki.lazarus.freepascal.org/BidiMode that's really interesting page, thanks for pointing and creating it.