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.
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>
To run this plugin, include an instance in the swup options.
const swup = new Swup({
plugins: [new SwupHtmlLangPlugin()]
});