Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Change the HTML lang attribute on Swup navigation

License

Notifications You must be signed in to change notification settings

mashvp/swup-html-lang-plugin

Repository files navigation

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()]
});

About

Change the HTML lang attribute on Swup navigation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published