Glossary

I18n

Acronym
Also known as: internationalization, l10n, localization, locale
TechI18n

Definition

Internationalization — i, eighteen letters, n — designing a product so that it can be adapted to any language and region without changing the code: strings out of the templates and into message files, dates, numbers and plurals formatted by locale, layouts that survive text that is twice as long or reads right to left

Its partner is l10n, localization: the act of adapting for one locale, which i18n makes possible. This site runs on @nuxtjs/i18n with five locales (en, es, fr, de, kn), prefix_except_default routing so English is unprefixed and the locale lives in the route, message files under i18n/locales/, and one translated collection per locale that has one — guidesEs, guidesDe — with an English fallback and a disclaimer when it fell back or the translation is machine-made. A locale-messages test keeps every key present in all five files, because a missing key leaves a screen reader announcing an English control.

Tech

The cheapest time to do it is the first time a string is typed. A template that carries {{ t('feed.subscribe') }} costs one line more than one that carries the word; the site that put the word in the template pays for it in every language, forever.

Related Terms

  • a: Appearance
  • ?: Keyboard shortcuts