Restarters are based all around the world. We need to make the interface available in everyone’s own language.
Drop a reply to this topic if you’d like to help translate into your language!
Context
The system is internationalised, in that the infrastructure is in place for adding other languages (although currently based only on string replacements, so if there is any localisation needed in terms of layout, text direction, etc, that would need more work.) However, we need to add a couple of things - allowing user to choose language (both when logged in and when not, for new users); how to manage collecting translations from translators.
Determining which language to display for the user
when logged in
For logged in pages, I would think that the best option is to have a profile setting with which the user can pick their preferred language.
when not logged in
For non-logged in pages (e.g. /about, /user/register), we need to think about:
- a default language, and
- how to allow the user to switch between languages
default language
The default language is the language we display the pages in when someone has just navigated to the site.
Some options I can think of: just default to English; or, default to the language based on the location of the user’s IP address; or default to the language based on the user’s browser settings (https://stackoverflow.com/a/674570).
I think using the user’s browser settings is probably the best option. We might make an incorrect assumption of preferred language if just based on geographic location.
Allowing the user to switch language
Basically an interactive language switcher. A simple way is a drop down of different languages. Possibly with a flag displayed as a visual indicator, however trying to match flags to languages is probably a bit of minefield, so probably best to just stick to text.
Managing translations, making it easy for translators
The translation files are currently simple PHP arrays in Laravel. A couple of folks would be happy to go in and edit those in a text editor and push to our git repo, however in general we need a system on top of that to allow translators to add translations in a simple way. There’s a few web based interfaces that exist, some of which are designed to work specifically with Laravel. We need to evaluate those.
Krister mentioned using gettext and pofiles here:
Google seems to provide a service around that for allowing translation of po files in a web interface. I’d prefer something open source though.