Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11792] iOS: New Feature: Add RTL as a property in Labels to display Arabic text properly

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.1.4
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam
Reporterkosso
AssigneeUnknown
Created2012-11-05T18:04:18.000+0000
Updated2018-02-28T20:03:35.000+0000

Description

Feature Description

In order to correctly display Arabic text we need to implement the property RTL, which will align the the text to the right.

More info

In CSS this is done using direction:rtl

Extra comment

If you are passing a string in arabic, it should already have the proper orientation (as any i18n string).

Comments

  1. Vishal Duggal 2012-12-18

    Try this. Should work with any string in label Reference: http://www.iamcal.com/understanding-bidirectional-text/
       var win = Ti.UI.createWindow({
           backgroundColor:'white'
       });
        
       var label = Ti.UI.createLabel({
           text:'I am LTR string',
           top:10
       })
       
       var b1 = Ti.UI.createButton({
           title:'LTR',
           bottom:0,
           left:0
       })
       
       var b2 = Ti.UI.createButton({
           title:'RTL',
           bottom:0,
           right:0
       })
       
       b1.addEventListener('click',function(){
           label.text = 'I am LTR string';
       })
       
       b2.addEventListener('click',function(){
           label.text = '\u202EI am RTL string\u202C';
       })
       
       win.add(label);
       win.add(b1);
       win.add(b2);
       win.open();
       
  2. Hazem Khaled 2016-12-16

    No problem with Arabic labels, maybe with old OS versions, i think we have to close this in favor of supporting native natural text direction alignment AC-4680

JSON Source