BiDi Localization

BiDi Localization

When localizing a product or service to another part of the world, occasionally technical presets must be developed before the target translation is implemented. These presets take into account a degree of localizable material that language alone cannot inherently touch, including: dates, website links, currencies and additional backend architecture. The process of modifying original format to prepare the product or service to-be-localized is internationalization. GALA describes its role as to how software code is written to ensure that versions beyond the original language version can be created correctly, less expensively, and with greater ease. While most languages around the world read left-to-right (LTR), the process of internationalization becomes particularly interesting when localizing content into a language that reads right-to-left (RTL), such as Arabic and Hebrew. In which case, bi-directional coding is required as even RTL languages contain many LTR elements that will be discussed further.
A Bit More on BiDi
Bi-directional text, or “BiDi,” is used where text and user interfaces can flow in two directions. A good example of its usage is a line of Arabic text (RTL) that contains an English word (LTR). Typically these are proper nouns or particular terms that are not translated.

It is implemented for almost all Semitic languages including Arabic, Hebrew, Pashto, Farsi, etc.. So, what is the big deal? Can’t you just copy and paste Arabic text into the strings and be done with it? The reason BiDi requires special attention is due to the fact that code reads from LTR and therefore innately conflicts with RTL languages.

As you can see, the English and Arabic is flipped, along with punctuation and the Arabic letters. Numbers remain LTR.

Arabic is written in cohesive script; however, within strings, each letter is separated and detached from one another. Internationalizing these strings properly using the proper commands in the backend code will flip the strings, so the Arabic and English are properly displayed. But, why isn’t the English flipped? How do you avoid issues with the English or other LTR elements? Both questions will be discussed in detail later on. Even though the idea of BiDi is pretty straightforward, the process itself is not intuitive. Computers do not inherently understand which elements we want to see displayed LTR and which elements must read RTL.

When is BiDi used?
An important aspect of BiDi internationalization and localization into RTL languages involves market share. Currently the Middle East, where many RTL languages are spoken, is undergoing a sort of international boom where new products and services from all around the world are finally becoming available to the public. Even if a product or service is fully functional without proper BiDi convention, the fact of the matter is that the consumer will have less faith in a product if it is not optimally localized or relatable to the target public. Another important point is to know which products are being used by each locale, which may help in cases of prioritization and up-stream management decisions. As the market for technology grows in the Middle East and Arabic-speaking countries, the value of proper BiDi internationalization also grows.

It’s clear that Android and iOS products dominate the market share for smartphone devices. This is not new information if you have worked in the industry for the past few years. However, Microsoft had a head start in setting up internationalization for its devices, and Android now boasts the greatest number of users in the market share. Especially with the newest releases of Xcode software used to localize apps, Android apps are much easier and hassle-free in comparison to apps designed for iOS. Thus, more emphasis is given to localizing Android and Microsoft based products than iOS or Mac-specific products and services.
Mobile Operating System Popularity in the Middle East source:
To Flip or Not to Flip?
The decision whether or not to flip an element for BiDi internationalization creates a common opportunity for over-localization. A common misconception in localizing content for RTL languages is to simply flip every possible element so that the reproduced version is a mirrored twin of the source. While this is true for most of the design (ie. buttons, headers, lists…), it is not the case for a few key instances that typically deal with numbers. While RTL languages use their own Arabic numerals for UI interfaces, RTL language speakers will often type phone numbers, email addresses, and passwords to include European digits.
source: “Bidi on Android and iOS.” 2015 Craig R. Cummings

So, it’s pretty important that such elements are BiDi enabled or else the user would find it pretty frustrating and become unsatisfied with their experience. In these cases, poor understanding of these differences can render a website or mobile app useless to an entire locale or group of locales, while damaging reputation and losing users.

If you’re wondering how to start the process of configuring a project for dual directionality, you can try using BiDi Checker for free. Like other tests that determine a pre-existing degree of internationalization capability, this type of open source program sifts through websites to point out any potential obstacles or poor preparations for BiDi.