Skip to content

Meta: i18n System Priorities

knod edited this page Dec 12, 2018 · 4 revisions

What do we need and/or want out of a translation/internationalization (i18n) system? A work in progress.

A question that's come up a few times already is whether we should use an i18n library for translating/internationalizing. Our list of priorities is why we haven't done it so far. Very briefly, in no particular order, and possibly incomplete:

  1. Make it easy for non-coder translators to know what to do as easily as possible (which we do with the google docs).
  2. Make it js-object-like to use in the code so use of it is accessible to less experienced coders.
  3. Allow interpolation of translations with contents we want to keep steady. E.g. changing the text of a link without changing the url or including a heart icon.
  4. Allow us to substitute English when there's no translation available.
  5. Allow us to add a lang attribute to each translation that matches up with the text being used for it.
  6. Versions
    1. Allow us to version our translations in their files. Yes, this part is a bit harder to understand (and explain). For now, if you want to know more, just talk to us about it. Example: name_v2
    2. Don't let version numbers interfere with the code. In the components themselves, have the names stay the same so that when a translator changes the version number, the component code doesn't need to be updated. Example: translations.i_name.
  7. Allow us to retrieve the just the plain text of a translation.