Public Lab Research note

GSOC 2016 Outcome : Internationalization of

by jiteshxyz | August 22, 2016 17:48 | 612 views | 2 comments | #13382 | 612 views | 2 comments | #13382 22 Aug 17:48

Read more:

Internationalization of

Project Details

Project Title: Internationalization of

Project Proposal:

GSoC Project Page:

Abstract/Summary: Developing Internationlization infrastructure on and setting up translation crowdsourcing platform.

Version Control: Github

Organization Mailing List:!forum/plots-dev

Github Organization Page: Publiclab

Repository Contributed to: plots2

Languages/Framework Used: Ruby on Rails, JavaScript, HTML5/CSS3

All commits made during the period can be found here:

About Internationalization

Internationalization is a design process that ensures a product (usually a software application) can be adapted to various languages and regions without requiring engineering changes to the source code. Localization (which is potentially performed multiple times, for different locales) uses the infrastructure or flexibility provided by internationalization (which is ideally performed only once, or as an integral part of ongoing development).

(Taken from Wikipedia)

The Project

The project primarily involved introducing the Ruby on Rails I18n(I + (some 18 characters) + N = InternationalizatioN) infrastructure to plots2 codebase. This was primarily achieved by rails-I18n gem. Multiple views and controller files were made I18n-friendly in the process. Separate preference field for the language as a locale tag [Pending as a Pull Request] and switching controls in the header/footer of the website is now available to enable the user to manually set the preferred language.

A lot of focus and care has been given to ensure non-enforcement of structures to text. This has been achieved by a method called interpolation. For additional implied locale detection, HTTP-Accept Language header is leveraged to easily detect language directly from user's web browser. Sessions was extensively used for cross-pages locale persistence. Javascript I18n was added with I18n-js gem. Rigorous functional and integration tests for I18n ensures that the translate helper method can successfully fetch localized strings from their respective data dictonary translation files(yaml). In case of any missing translation text, a fallback mechanism will be triggered and the default locale(English, in our case) texts will be substituted in the place of missing text(s).

I18n Community Platform

All our Internationalization efforts are now hosted on Transifex - an excellent localization platform. Over 71 translation files in English language has been uploaded for translation to different languages. Over 3300 sentences/words are now available for translation here. An easy introduction to Transifex as a translator can be found on this Wiki page. For code contributions, an easy introduction to I18n in Ruby on Rails can be found here.

How to Use

enter image description here

  • Go to
  • Click on "Login" tab on the header. Under "Language" sub-tab, choose any preferred language. (In our example, we choose "Deutsch")

enter image description here

  • All texts on the page will appear in the chosen language.

Pending Tasks

Considerable number of views and controller are now Internationalized as evident in the config/locale directory structure. Locale tags code and logic is almost complete in this pull request, and locale-specific subdomain is now working locally but fails few I18n-related tests. As the work behind these tasks is almost complete, it would take only a couple of days before these are merged.


I would like to thank my mentors Jeffrey Warren and Liz Barry for the guidance and extremely helpful feedback on this project, and to the whole community and GSoC-2016 students for their constant support.

I have learned and benefited a lot in this project, and as a result of a very positive experience I am looking forward to continue contributing to Publiclab and be a part of this journey. Really excited for the September 2016 Open Hour!


For any queries or support, please contact me at or drop a line at


Hi, Jitesh -- I want to thank you for your thorough and well considered work this summer. The i18n project is so large that it could have seemed daunting -- as it touches a huge number of files and involves serious low-level reconfiguration, and even touches every single page on the website; a high risk if things go wrong. Yet your work was methodical, consistent, reliable, and steady -- exactly what's called for in this project. You've been easy to work with and responsive to suggestions and input.

An all-around big thanks for your excellent work! I look forward to seeing it bring Public Lab to many new languages.

Reply to this comment...

Thanks Jeff! Loved to be a part of the process. :)

Reply to this comment...

Login to comment.