nativescript-rtl / ui

Add right-to-left support to the NativeScript framework
MIT License
24 stars 3 forks source link

Make all layouts RTL from code #5

Closed Izrab closed 5 years ago

Izrab commented 5 years ago

When user changes app language from English to Arabic, this plugin should have a function to change all the layouts to RTL from code.

xlmnxp commented 5 years ago

@lzrab you can change language by isRtl property

abozanona commented 4 years ago

@xlmnxp Could you please explain your answer? Is the isRtl property supported for all elements? Could you provide a code snippet of how to use the isRtl property?

xlmnxp commented 4 years ago

@abozanona isRtl property work only in supported Rtl layouts Example


    <Label text="Label 1" width="70" height="70" backgroundColor="red"/>
    <Label text="Label 2" width="70" height="70" backgroundColor="green"/>
    <Label text="Label 3" width="70" height="70" backgroundColor="blue"/>
    <Label text="Label 4" width="70" height="70" backgroundColor="yellow"/>
  </rtl:WrapLayout>```