loio |
---|
50079678e0cc4c8298f764580fc223d3 |
view on: demo kit nightly build | demo kit latest release
The following table outlines some common issues that occur when implementing right-to-left (RTL) support for OpenUI5 controls and their solutions.
RTL Issues and Solutions
Issue |
Solution |
---|---|
In RTL mode (right-to-left) the image shown is not mirrored, but it should be. |
Create the correct RTL version of the image manually and put it into the |
In RTL mode (right-to-left) the image shown is mirrored, but it should not be. |
Make sure that there is no corresponding image with the same name in the |
The background position in CSS is correctly mirrored, but the LTR version of the control works fine with the default background position: |
Specify the background position explicitly to display the RTL version correctly. |
Text is incorrectly aligned because the CSS |
Do not use |
If style is set using JavaScript (for example, in the renderer or behavior of a control), the conversion does not take place and the result looks incorrect. |
Consider the RTL mode in your calculations, or when possible, use the CSS file instead (which is automatically handled) and write a CSS class. |
The alignment of popups with the parent element is unaffected by RTL mode and is therefore often incorrect. |
|
When JavaScript calculations are used to determine positions or dimensions, existing implementations might imply LTR mode and result in an incorrect layout. |
Make these algorithms RTL-compliant by checking the SAPUI5 RTL configuration. |
Some text elements inside the control may look incorrect, for instance parentheses may be shown in the wrong position, pointing to the wrong direction. For example (very) short text might be rendered as very) short text) in RTL mode. |
This is a result of the browser's |
When a control has a |
Use the API Properties for Right-to-Left Support in Text-Displaying Controls . Additionally, the static helper method |