-
-
Notifications
You must be signed in to change notification settings - Fork 64
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:
- Make it easy for non-coder translators to know what to do as easily as possible (which we do with the google docs).
- Make it js-object-like to use in the code so use of it is accessible to less experienced coders.
- 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.
- Allow us to substitute English when there's no translation available.
- Allow us to add a
lang
attribute to each translation that matches up with the text being used for it. - Versions
- 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
- 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
.
- 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:
- Allow us to retrieve the just the plain text of a translation.