Coding for localization Providing alternate layouts

suggest change

Language-specific layouts are often unnecessary when the layout uses start and end, as described earlier. Default layouts can still break for some languages. A left-to-right layout may not work for a right-to-left language. Provide a dedicated layout in that case.

For RTL layouts, use the ldrtl resource qualifier (layout-direction-right-to-left). Keep the default files in res/layout/ and the RTL files in res/layout-ldrtl/.

The ldrtl qualifier is great for drawable resources, so that you can provide graphics that are oriented in the direction corresponding to the reading direction.

Here is a great post which describes the precedence of the ldrtl layouts : Language specific layouts

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents