5

I have Arabic translations in application. The app also supports RTL layout. When the user uses Arabic everything looks fine. The problem is that when I change local to e.q. Persian where they use RTL but I don't provide translation for this langue my layout looks like a mess.

How to disable RTL if no translations is available for current local?

1 Answer 1

0

Try some thing like this. Did no try it myself but was thinking around this.

Configuration config = context.getResources().getConfiguration();
   if (config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
      //if you do not have a string defined here you can disable it here
        config.setLayoutDirection(View.LAYOUT_DIRECTION_LTR);

    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.