How to to type bottom to up and right to left in a field

Mark Waddingham mark at livecode.com
Thu Sep 21 14:03:03 EDT 2017


On 2017-09-21 19:48, Mark Waddingham via use-livecode wrote:
> <slight tangent>
> 
> For example, let's say you have a right to left language FOO which has
> letters A, B, C; compared to a left to right language BAR which has
> letters X, Y and Z. Hello in FOO is spoken A-B-C; Hello in BAR is
> spoken X-Y-Z. However, as FOO is right to left, Hello is written CBA.
> If these languages were mixed in a single piece of text - spoken as
> A-B-C X-Y-Z - then in memory the order would be ABC XYZ, but visually
> it would appear as either:
> 
>   i) from the left edge - CBA XYZ
> 
>   ii) from the right edge - XYZ CBA
> 
> Whether it would be (i) or (ii) depends on which is considered to be
> the dominant language in that case and context.
> 
> </slight tangent>

I should perhaps have mentioned the 'useful' outcome of the above 
tangent...

If text is always stored in memory in logical order (in the order we 
utter it / actually read the individual constituent parts), then 
processing of a string containing left-to-right text, or right-to-left 
text or any mixed combination there-of needs no more thought than 
processing a string which is composed of a language which is written 
left-to-right - because (logically - in terms of how humans process it 
themselves) there is no difference.

All apparent 'difficulties' and 'oddness' which dealing with non 
left-to-right text are confined solely to the presentation layer - which 
at the level of rendering text, LiveCode does for you.

This is important to remember if you are involved in localisation 
applications to languages such as Arabic - the main work you have to do 
is getting the translations in the first place, and *potentially* making 
your app right-to-left dominant, rather than left-to-right (i.e. labels 
should go on the right of fields, rather than the left, and things 
should generally be aligned to the right, rather than the to the left - 
although the actual alignment of text within fields  / buttons etc. will 
'do the right thing').

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the Use-livecode mailing list