Hi there. What would be the bare minimum code needed to create a label with its upper corner in 50,50 and lower right in 550,150 where I can put text in it, but when I add more text (longer string) the font should auto resize so that the text still fits inside the rectangular area I defined ? Oh and I would like the text to be centered in it.
Hi Bart,
You would want to use labelWidth and labelHeight parameters.
There is something I don't really understand perfectly, but I have to ask it anyway to be sure.
The apps I am creating (for toddlers) will become available in 20 languages (actually 18 languages + Belgian dutch and dutch spoken in The Netherlands
)
ARABIC is one of those languages and thats a right to left language (the others are not)
I tested the code in the image and found out that the Arabic is shown perfectly ok on the screen. The text begins at the right and goes to the left + when the line is full it continues on the next line. That seems to be the correct way.
BUT..... when I don't change anything to the code except the value of text:"This is a normal English sentence too long to fit on 1 line", then this is ALSO shown perfectly fine, but L2R.
HOW does ZIM know automatically when to display R2L and when L2R ? It's like magic and I'd like to understand.
We worked a fair bit with the help of @racheli, @marvafink, @amihanya and others to try and get the left to right / right to left to work (I don't want to jinx it) but it is also in combination with HTML/JS and CreateJS that it all works. I am not sure I can explain it.
Well I found it quite special that it seems to "recognise" when it needs to R2L just based on the contents of the text property. Maybe it's just as simple as that and it just looks if it detects some kind of Arabic characters in the string. The most important is that it seems to work very fine.
The Doc need to be RTL and some component in ZIM get rtl true/ false.
For Labels that work perfect for Hebrew and Arabic.
Can you clarify amihanya? do you mean that some properties have to be changed? Or that it just detects it based on what is in the text string of the .text property ?
The need to get direction:rtl in CSS or set to body dir=rtl
I know that browsers report rtl and ltr language specs. So its probably getting the information by that. I am sure not all framework components work flawlessly.
