2 min read

Localization

Bringing Kallax.io to your native language!

I am working on translating Kallax.io as it is a common request, in particular by the German and Spanish part of the community.

I still need to enable the translation in a lot of places, but the system for delivering and setting up translation is ready.

I know a lot of sites are fully machine translated today, but I prefer not to do that.

My mother tongue is a fairly small language (Danish) and it gets absolutely butchered by machine translations sometimes. Some of the fun and quirky phrasing also gets lost in translation, so I have decided to attempt crowd-sourcing translations instead (possibly with machine translation to fill the gaps).

Helping translate ♥️

We are gradually translating the site in batches. You can contribute by adding your suggested translations to this Google Sheet.

Each language has a tab. Pick the one matching the language you want to help translate to.

  • Column A shows the original text
  • Column B indicates which, if any, translation has been accepted
  • Column C is machine translated (Google Translate).

To help out, simply write your suggestion in an empty column. We will periodically validate and update the translations on the website.

You can request another language to be supported on our Discord.

Translation format

The localization strings supports placeholders, formatting and action buttons.

en: Hello there!
da: Hej med dig!

Example of simple translation

en: Welcome to <b>Kallax</b>.io
da: Velkommen til <b>Kallax</b>.io

Example of translation with basic HTML

en: Hello {0}!
da: Hej {0}!

Example of translation with placeholder replacement

en: Hello, you can [[import your collection]] or [[search the database]]
da: Hej, du kan [[importere din samling]] eller [[søge i databasen]]

Example of translation with actions embedded

Placeholders and action buttons can be re-ordered using explicit indexes as some languages require a different word order to sound natural.

en: {0} <b>{1}</b>, [[save]] or [[continue]]
da: {1} <b>{0}</b>, vil du [[1:fortsætte]] eller [[0:gemme]]

Example of translation with actions embedded

Translations must contain the same amount of placeholders and action buttons to be valid. Note that if the English source text does not make use of formatting for example, then it won't be available to the other translations either.

en: Hello {0}, [[click here]]!
[BAD] da: Hej med dig!, [[klik her]] // Missing placeholder
[BAD] da: Hej {0}, klik her // Missing action
[BAD] da: Hej <b>{0}</b>, [[klik her]]! // HTML not enabled

Example of invalid translations

Partial language support

The translation system supports partially supported languages. The English text will be used as fallback if a translation is missing.

Advanced

The localization is served from a .json file that you can override to see your suggested changes on the live page. For chromium based browsers;

Open Developer tools
Navigate to the Sources tab
Open the Overrides sub-tab
Create the file /kallax.io/loc/en/i18n.{app-version-fingerprint}.json

The file contains a JSON map of translations. I recommend downloading the latest translation from the website and using that as a template.

{
    "key": "translated_value"
}

Hard-refreshing CTRL + R will force the localization system to load your modified strings from your local cache. Note that the original text might show up on refresh and then disappear, as the server pre-rendering will not have be affected by our local overrides.