[Lazarus] BiDi mode support

Giuliano Colla giuliano.colla at fastwebnet.it
Wed Nov 15 19:42:09 CET 2017


I have a family of application which must support the change of language 
on the fly. This we're doing since a lot of time, and everything works 
just fine.

Now I face the problem of providing support also for right to left 
languages, such as Arabic.

Application.BidiMode can be set true or false, depending on the selected 
language, and that's ok, but setting up the proper alignment is rather 
cumbersome, IMO.

You can use flipchildren() but after that I didn't find a way to detect 
if control alignment is the original one at design time, or it has been 
flipped. One should add a flag to each form in order to keep track of 
the flipping history.

A more general solution to properly support right to left languages and 
layouts, IMHO, would be to add an isFlipped property to Tcontrol, which 
is toggled each time the control is flipped. It wouldn't be Delphi 
compatible, but also flipchildren() isn't Delphi compatible, so this 
shouldn't be an issue.

However, before submitting a patch I'd like to know if I'm missing 
something, and the solution is already there.

Giuliano



More information about the Lazarus mailing list