Multilingual

Translating Alpha

Author oxypteros

Even if your content is in one or more languages other than English, Alpha’s interface remains in English by default. To build a complete and consistent multilingual website, you’ll need to translate Alpha itself into your language(s).

How to Translate Alpha

  1. Copy the file /themes/alpha/i18n/en.toml into your site’s /i18n/ root folder.
  2. Rename the copied file to match the language code you defined in /config/_default/languages.toml.

For example, if your languages.toml defines Spanish and Italian like this:

[es]
  weight = 1
  languageName = "Español"
  languageCode = "es"

[it]
  weight = 2
  languageName = "Italiano"
  languageCode = "it"

Then, in your site’s /i18n/ folder, you would create (by copying and renaming en.toml):

  • es.toml (for Spanish)
  • it.toml (for Italian)

What to Translate

Each translation file contains entries in the following format:

[Identifier]
one = "Single value"
other = "Plural value"

Do not change the [Identifier]. You only need to translate the one and other values.

Example: the first entry in en.toml is:

[Homepage]
other = "Homepage"

In Spanish (es.toml) would be :

[Homepage]
other = "Página Principal"

and in Italian (it.toml):

[Homepage]
other = "Pagina Iniziale"

Repeat this process for each entry in the file until you reach the comment:

...
# OCD
...

404 Page Translation

Alpha provides a custom 404 error page. If your site is multilingual or in a different language, then copy the default English 404.en.html (alpha/layouts/404.en.html) into your site’s root layouts/ folder and rename it using the language code.

For example for Spanish:

/layouts/404.es.html

and for Italian:

/layouts/404.it.html

Questions no one asked

But I’m answering them anyway.

Why I should not translate below the OCD comment?

You are free to do so, if you want to. But the entries under # OCD are used only by the OCD, they are visible only to you and as such do not need to be translated. Also, note that OCD entries are not complete and may change in future updates, especially while it’s in beta.

Can I Share My Translation?

Yes! If you’ve translated Alpha and would like to share it with other users, please follow the instructions on the Support page.

What about RTL Language Support

Unfortunately, Alpha does not currently support right-to-left (RTL) languages. This may change in the future.

Edit this page on Github