Change application direction using Phonegap or SAPUI5

341 views Asked by At

I am not able to change my app direction using (html dir="ltr"), after android device language has been changed to arabic. How can I change my app direction to ltr using phonegap or sapui5?

2

There are 2 answers

0
Abraham Gnanasingh On BEST ANSWER

To change application direction, sapui5 provides script tag attributes for configuration. Just include sap-ui-rtl="false" and sap-ui-language="ar" attributes in your script something like,

<script src="resources/sap-ui-core-all.js" data-sap-ui-rtl="false" data-sap-ui-language="ar"></script>
1
Dipesh Parmar On

That is kind of not possible,

Reason : Because if you do that then you would need to build entire android app again and then run it in device.

Possible Solution

You can use navigator.language to detect device language and based on that you can load different CSS and HTML.