Language Manager for Craft CMS
The Language Manager plugin adds easy integration for a language switcher and for the correct hreflang attributes in the header.
- The language switcher is a simple menu that links to all parallel language versions of the same page
- The hreflang tags add the correct hreflang attributes in the header of the page (including setting the x-default tag for the primary version)
Language Switcher
The language switcher will switch to the parallel site in a different language, if there is no parallel site, it will fall back to the main page. The labels can be set set to presets or customized.
Easy integration via hook
{% hook 'languageManagerNavigation' %}
Advanced custom integration
The plugin exposes a twig function getLanguageManagerPages()
, which returns an array of page objects. With this, you can build your own menu.
Available Labels
You can choose from several options to display the language switcher labels.
- Language Code (e.g. 'EN')
- Long Language Code (e.g. 'EN-US')
- Language Name (e.g. 'English')
- Long Language Name (e.g. 'English (United States)')
- Your own custom label translations
Hreflang Tags
Easy integration via hook
{% hook 'languageManagerHreflang' %}
Advanced custom integration
The plugin exposes a twig function getLanguageManagerPages()
, which returns an array of page objects. With this, you can customize your hreflang tags.
Config
Settings can easily be edited via the control panel. Additionally, they can be set via config file to overwrite the control panel settings.
Detailed documentation
For further info please consult the full documention here.
To install this plugin, copy the command above to your terminal.
This plugin doesn't have any reviews.