Today, we're proud to release our first piece of open-source software.
Last summer, while preparing to launch our English course for Arabic speakers, we addressed a gap in support for right-to-left (RTL) languages on Android.
The digital world has long been developed with English and other left-to-right languages in mind, and although RTL support has been improving over time, gaps such as these matter to us a great deal. Duolingo was founded with the mission to bring free education to everyone, including people who have been overlooked by traditional education and tech companies for decades.
There are about 650 million native speakers1 of RTL languages. For many of them, being able to learn a new language is a powerful, life-changing opportunity. In fact, ICEF reported that in some areas, Arabic-speaking employees with English skills earn three times as much as those with no English skills! These are exactly the people we wanted to reach.
In recent months, we've gone on to add French, Swedish, and German courses for Arabic speakers (these were added in response to the recent Syrian refugee crisis) as well as a brand new Hebrew course for English speakers.
An open-source bidirectional ViewPager
This library is straightforward but useful, adding RTL support to the popular
Such support allows content to flow more naturally when displayed in RTL languages.
In Android apps, swiping side to side to reveal content is a common paradigm, and can be seen in
popular apps such as Facebook
implements this functionality, and is available as part of the
v4 support library,
originally released in July of 2011. Despite the Android platform's support for RTL layouts since
Jelly Bean, the
ViewPager component was never updated with support2. While bringing our
first course for Arabic speakers to Android last year, we developed
RtlViewPager in order to give
those users the same seamless experience as our other users.
Let's see it in action
This library gets a prominent place on the main screen of the Duolingo app. As you can see, it
integrates seamlessly with
Duolingo's skill page demonstrates another interesting case for
RtlViewPager since three views are
visible in the default state.
Using the library
For instructions on how to use the library or to browse the source code, visit the project on github at https://github.com/duolingo/rtl-viewpager.
Interested in Android development? We're looking to hire an Android developer. Find out more.
This is not straightforward to calculate since some languages may be written using multiple writing systems. For example, after Arabic and Urdu, the third most widely-spoken RTL language could be either Farsi or Punjabi. Although there are more total speakers of Punjabi than Farsi, only about half use an RTL script. ↩