As a reseller you are able to Whitelabel our dashboard. One of the setings you can alter is the language of the dashboard interface. Out of the box Bits on the Run maintains only English and Dutch. Other languages can be provided by resellers themselves. This tutorial explains how you can add your own translation.
It is important to first decide if its worthwhile to offer your clients a translated dashboard. For example, as a reseller you support your own clients. This means translating the Bits on the Run documentation to whichever language needed, for proper support. We currently only offer support documentation in English.
Another important thing to note is that Bits on the Run releases software updates on more or less a monthly basis. Each release includes features and bug fixes, and could imply the need for additional translation. If you choose to provide your own translations, you will need to provide updates of the translation as well to prevent the translation from being incomplete (i.e. partially your Language of choice and partially English).
Once thing we are looking to the community to help us with are translations. Ideally we would like the Bits on the Run dashboard to support multi-languages that best reflect our customers (and your customer's) needs.
If you've decided to help us with a translation for your dashboard, you can send us an email to feedback (at) bitsontherin (dot) com or fill out our Contact Us and tell us which language you would like to provide. We can potentially support the following languages:
Currently our interface is only able to display languages from left-to-right. Right-to-left navigation is in our backlog of features to add.
After you contact us to submit a translation, we will send you two text-based files. One is a .po file that contains the majority of the translation work. The other is a JavaScript file that contains the strings that we use in our JavaScript.
A .po file is basically a text file and you can edit it with a plain text editor. The only thing you have to make sure is that you save the file in plain text and in UTF-8 format. For windows you could use Notepad++ and on a Mac you could use TextWrangler. There's also a free tool dedicated to editing po files. It is called Poedit.
Once you open the file you will see a bunch of strings that look this:
#: apps/account/views.py:10 msgid "Allow video downloads and player embeds" msgstr ""
You will then have to edit the msgstr "" and insert your translation. A translation to Dutch looks like this.
#: apps/account/views.py:10 msgid "Allow video downloads and player embeds" msgstr "Sta video downloads en spelers invoegen toe"
Sometimes we need to use dynamic content in a string during runtime and this results in strings that contain a variable.
#: templates/account/details.html:60 #, python-format msgid "You used %(traffic)s in total for this period." msgstr ""
These strings get the extra #, python-format notification. Translation is simple. Just copy the variable and place it in the proper location of your translation. In Dutch the result looks like this:
#: templates/account/details.html:60 #, python-format msgid "You used %(traffic)s in total for this period." msgstr "Je hebt deze periode in totaal %(traffic)s gebruikt"
In this example the string %(traffic)s will be replaced by a variable with the name traffic. It is important that you do not translate the name of these strings. You should also make sure that the syntax of these replacement strings remains intact.
Also a string can span multiple lines. An example of a Dutch translation looks like this:
#: templates/account/template_details.html:56 msgid "" "The video height is automatically calculated using the video aspect ratio." msgstr "" "De hoogte van de video wordt automatisch berekend aan de hand van hoogte-" "breedte-verhouding."
If you choose to translate the po files with Poedit, the workflow will more or less explain itself. Your interface will look something like this:

A JavaScript file comes to you in a regular JavaScript format. It's basically an associative array of strings. according to the following format:
string_id: "Translation of that string",
When you receive the JavaScript file for your language it will contain the translations in English and it will look like this:
LOCALES['nl'] = {
//GENERIC//
ready: 'ready',
//CUSTOMVARS//
customvars_no_name_set: 'Please set a name for this value. Without name the value will not be saved.',
//DATE_INPUT//
date_input_months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
// Just an empty string...
empty: ''
};
You just have to replace the English with strings for your translations. A result in Dutch would look like this:
LOCALES['nl'] = {
//GENERIC//
ready: 'klaar',
//CUSTOMVARS//
customvars_no_name_set: 'Kies AUB nog een naam voor deze waarde. Zonder naam wordt ook de waarde niet opgeslagen.',
//DATE_INPUT//
date_input_months: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
// Just an empty string...
empty: ''
}
As you can see in some cases translations can be in the form of an array. Basically you just need to translate all the English strings and leave the identifiers as is.
If you ever need to use a ' in your translation, make sure to escape them properly by adding a in front of the '. E.g don't will become don't.
After each update of our dashboard, we will send over the new versions of the translation files. We will then ask you to complete the new translations. For the .po files you have to look for new and empty strings and so called fuzzy strings. These fuzzy strings are automatically translated based on similar strings in the same document. Sometimes these fuzzy translations make sense, but sometimes they don't. It's always good to go through an update translation file and check all these fuzzy strings.