Languages/Translations
Sometimes we publish a story in more than one language, and we want to point people (and Google) to the correct version.
Options
Languages are configured in a {language}
block inside the config. You'll need to do this on both versions of the story. This lets people go from, for example, English to Spanish and vice versa. It also tells search engines that it's the same story in both languages and should route users based on their preferred language. All of these options are required and have no defaults.
value | purpose |
---|---|
code |
Two-letter language code for the other version we're pointing to. |
link |
URL for the other story we're pointing to |
message |
Link text, usually some version of "Read in |
current |
Two-letter language code for the current story |
Caution
Remember, versions of this configuration need to be on both stories. If not, reader utility and SEO value are lost.
Example configuration
This example would be used in the config for an English version of a story, pointing readers (and Google) to the Spanish version.
{language}
code: es
link: https://www.lavozarizona.com/in-depth/noticias/2018/12/05/basurero-toxico-frontera-mexicali-mexico-contaminacion/2014658002/
message: Leer en espaƱol
current: en
{}