hreflang identifies the language and, optionally, region of an alternative page. On a multilingual Joomla website, these annotations help search engines connect translations of the same content.
How language annotations work
In HTML, link elements with rel="alternate" and hreflang appear in the head section. HTTP headers or an XML sitemap can also carry the information. For example, en identifies English, en-GB targets English for the United Kingdom and ru identifies Russian.
A region supplements a language and cannot be used alone. The x-default value can identify a fallback for visitors not covered by the listed languages, such as a language selection page.
What to check
Associated pages should list themselves and their corresponding alternatives, with reciprocal links between versions. Use complete URLs of accessible pages. Linking every article to the other language home page does not identify its translation.
hreflang does not translate text or redirect visitors. The document lang attribute describes the HTML language, while canonical identifies a preferred address. These mechanisms have separate purposes and should be consistent.
hreflang in Joomla
In Joomla, assign languages to content and menu items, enable the required language features and associate translations. Output also depends on the component involved. After linking Joomla content, inspect the final head annotations and test the language switcher on the website.
Russian and English pages should point to each other and retain appropriate canonical URLs. Matching aliases can simplify maintenance, but do not create a language association by themselves.
Conclusion
hreflang describes the relationship between language versions. Reliable setup requires checking language codes, destination URLs and return links.