Skip to content

Extract translatable strings from templates

For localization, we need to pull translatable English strings out of templates. This will allow for swapping in the each string with one in the user's chosen language.

We should break this work up into at least a few MRs:

  • Hugo templates
  • Vue components

Strings should go into YAML files in the data directory. Create a separate YAML file for each component.

Here are some examples from the marketing site: https://gitlab.com/gitlab-com/marketing/digital-experience/buyer-experience/-/blob/main/locales/en-US.json

We'll want YAML, but similar idea: descriptive keys, with the actual text as the value.

See https://gohugo.io/content-management/multilingual for how to set this up for Hugo.

For Vue, we'll need to do something a little custom. We should avoid having separate imports for each language in every single component.

Edited by Sarah German