1e41f4b71Sopenharmony_ci# UI Design for Internationalization 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciA set of effective internationalization guidelines for UI design can not only establish the tonality of products, but also ensure consistent user experience. Complying with the following guidelines can effectively improve the quality of your products targeted at global markets. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci## Space Reservation and Flexible Layout 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciThe length of translations languages varies greatly according to languages. Translation may increase the length of UI texts. To ensure that UI strings are not truncated after being translated into other languages, the best practice is to use flexible dynamic layout. That is, UI controls are dynamically adjusted based on the text length. If flexible layout is not applicable during actual development, reserve sufficient text space. The following table takes English as an example to provide the reference space to be reserved for translation. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci**Table 1** Reserved space on the UI for translation 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci| Number of English Characters| Ratio of Reserved Space| 12e41f4b71Sopenharmony_ci| -------- | -------- | 13e41f4b71Sopenharmony_ci| Less than or equal to 10| 100% to 200% | 14e41f4b71Sopenharmony_ci| Greater than or equal to 11 and less than or equal to 20| 80% to 100% | 15e41f4b71Sopenharmony_ci| Greater than or equal to 21 and less than or equal to 30| 60% to 80% | 16e41f4b71Sopenharmony_ci| Greater than or equal to 31 and less than or equal to 50| 40% to 60% | 17e41f4b71Sopenharmony_ci| Greater than or equal to 51 and less than or equal to 70| 30% to 40% | 18e41f4b71Sopenharmony_ci| Greater than or equal to 71| 30% | 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci## UI Mirroring 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ciDifferent text alignment modes and reading sequences may be used for different languages. For example, English is read from left-to-right (LTR), and Arabic and Greek are read from right-to-left (RTL). To ensure that the displayed content complies with the local language habits, ensure that the UI element layout supports UI mirroring, as shown in Figure 1 and Figure 2. The key points for UI mirroring design are as follows: 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci- UI layout mirroring. The UI should allow the content of an RTL language to be displayed in the original layout, meeting the bidirectional reading experience. For example, ABC is read ABC for an LTR language and CBA for an RTL language. 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci- UI element mirroring. UI controls and icons with directionality are required to comply with mirroring rules, as shown in Figure 3, Figure 4, and Figure 5. Some icons, for example, the clock face, do not need to be mirrored because they are not directional or related to real objects. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci- Touch and operation. The touch or operation on each UI element should comply with the reading sequence of the language in use. For example, if there are multiple tabs, swiping left means to move backward for an LTR language and swiping right means to move backward for an RTL language. 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci- Support for mixed text. Regarding text direction, the UI should support excellent mixed text rendering (for example, English text is available in bidirectionality, and vice versa). 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci**Figure 1** Example general layout (English) 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci**Figure 2** Example mirroring layout (Arabic) 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci**Figure 3** General icon resources 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci**Figure 4** Icon resources for RTL languages 45e41f4b71Sopenharmony_ci 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci 48e41f4b71Sopenharmony_ci**Figure 5** Mirroring controls for RTL languages 49e41f4b71Sopenharmony_ci 50e41f4b71Sopenharmony_ci 51