@mashvp/swup-html-lang-plugin
v1.1.0
Published
Update the HTML lang attribute on Swup navigation
Downloads
3
Readme
Swup HTML lang Plugin
This is a plugin for swup - complete, flexible, extensible and easy to use page transition library for your web.
This plugin will update the lang
attribute of the HTML node after navigation, which is useful for multilingual sites.
Instalation
This plugin can be installed with npm
npm install @mashvp/swup-html-lang-plugin
and included with import
import SwupHtmlLangPlugin from '@mashvp/swup-html-lang-plugin';
or included from the dist folder
<script src="./dist/MashvpSwupHtmlLangPlugin.js"></script>
Usage
To run this plugin, include an instance in the swup options.
const swup = new Swup({
plugins: [new SwupHtmlLangPlugin()]
});