Sometimes simply translating website content into another language isn't enough. For many markets with complicated languages, localization is an essential aspect of website translation. Non-Latin characters, right-to-left (RTL) languages, and text expansion are some of the factors which must be considered for languages like Chinese, Arabic and German.
Arabic, a popular RTL language, is the 4th most spoken language, with 26 Arabic-speaking countries. Other RTL languages include: Hebrew, Persian and Urdu.
In this blog, I will cover some tips for localizing RTL languages.
1. Add "dir=rtl" to the HTML tag, this leads to right-aligned text and mirror-imaging of things like page and table layout, which cascades down through all the elements on the page. There is also a CSS direction property that changes the text flow of block level elements and text but does not affect the layout of the page.
Direction "dir" also specifies the directionality of tables.
When direction is used for tables, it displays as below:
2. Mirroring your layout means that things on the left should be on the right and vice versa. This includes floats,
::after elements, margins and padding.
3. Use the UTF-8 (Unicode) character encoding for content, databases, etc.
4. Fonts and characters: Arabic characters are wider and shorter than Latin characters, which gives a different visual appearance.
5. If you are going to use the same web font for all pages, make sure it is compatible with all of them.
6. Create a stylesheet for each direction.
7. If you have hardcoded words in your pages, keep them in separate translation files.
8. Localizing dates can be tricky in Arabic, you need to watch for dialectal differences (check out "What are the differences between Arabic languages?" for more info on this topic).
While RTL is a rich topic and there is more to cover, this article acts as the basic knowledge you need to start exploring RTL confidently. RTL is not about "flipping" or "translating" content, it's about making every aspect of the UI and layout RTL-friendly.
Further Resources on Arabic Localization, Arabic Globalization and Arabic SEO
Globalization Partners International (GPI) has extensive experience localizing marketing materials, technical documents, and large, scalable websites into the Arabic language. Due to increased demand for projects in Arabic and other BiDi languages, like Farsi, we have posted a number of useful guides to best practices in this area. Feel free to review our blogs that are particularly relevant:
- Arabic Language Translation eBook
- Arabic SEO and Localization
- Microsoft Introduces Arabic Translation to Skype
- Connections between Arabic and Hebrew
- What Are the Differences Between Arabic Languages
Please feel free to contact GPI at email@example.com with any questions about our language and technology services. Also let us know if you have any interesting blog topics you would like us to cover in our future blogs. You may request a complimentary Translation Quote for your projects as well.
About the Author
Rabab is a native Arabic speaker from Cairo, Egypt. She has over 12 years’ experience in software and websites architecture and implementation using open source programming tools including PHP, MySQL as well as jQuery, JSON and Ajax. She has served with various companies including Pyramid Technologies, Link-Dot-Net and InTouch Communications as a Programmer, Systems Engineer – Developer and Lead Web Developer. She earned her B.Sc. Degree in Economics with a minor in Computer Science from Cairo University. She completed a SSDP Diploma from the Information Technology Institute (IDSC), The Cabinet and is a certified Cloud Business Associate and a Microsoft Certified Professional (MCP, MCAD and MCSD.NET).More Content by Rabab Malek