lang metadata

Declare lang metadata to specify the primary language in an Aneamal file or quotation block. This is done by assigning a language tag such as en for English or de for German to the lang metadata name.

Benefits of a lang metadata declaration include:

The language tag can contain information on language varieties such as en-us for US-American English or de-ch for Swiss German. It is usually better to keep it simple than to be overly specific though. Make it as short as possible unless more details are necessary to distinguish different parts of a document.

You can find language tags in the IANA Language Subtag Registry. Search for the English name of the desired language there. German, for instance, is listed as German instead of as Deutsch, which would be the German name for German.

Sample language tags

Language Tag
Afrikaans af
Basque eu
Bulgarian bg
Croatian hr
Czech cs
Danish da
Dutch nl
English en
Esperanto eo
Estonian et
Finnish fi
French fr
German de
Greek el
Hebrew he
Hungarian hu
Icelandic is
Indonesian id
Irish ga
Italian it
Japanese ja
Korean ko
Latin la
Latvian lv
Lithuanian lt
Maltese mt
Maori mi
Navajo nv
Occitan oc
Polish pl
Portuguese pt
Quechua qu
Romanian ro
Sanskrit sa
Slovak sk
Slovene sl
Spanish es
Swedish sv
Turkish tr
Uighur ug
Ukrainian uk
Vietnamese vi
Welsh cy
Wolof wo
Xhosa xh
Yiddish yi
Zulu zu

Examples

@ lang: en

The first example above specifies that the file is written in English. The second example marks the content of a quotation block as German:

> @ lang: de
> Ich bin ein Berliner.

For developers

If lang metadata is declared, the Aneamal Translator adds a HTML lang attribute in its HTML output. The lang attribute for a webpage’s main file is added to the HTML html element.

<html lang='en'>

In the second example the lang attribute is added to the HTML blockquote element representing the quotation block:

<blockquote lang='de'>
<p>Ich bin ein Berliner.</p>
</blockquote>

Further reading