Skip to content

lullaby6/language-redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

17 Commits

Repository files navigation

Language Redirect

A lightweight and easy-to-use js library to redirection for support differents languages.

Installation

CDN

<scriptsrc='https://cdn.jsdelivr.net/gh/lullaby6/language-redirect/language-redirect.js'></script>

Download

Download

Usage

in HTML

In your script tag you can use the data-language-redirect attribute for config the redirects easly:

<scriptsrc='https://cdn.jsdelivr.net/gh/lullaby6/language-redirect/language-redirect.js' data-language-redirect='{"es": "/es/about.html" }' ></script>

in JavaScript

Also you can use the languageRedirect function to config the redirects via JavaScript:

languageRedirect({es: '/es/index.html'});

About

JavasScript Library - Languages redirects

Topics

Resources

License

Stars

Watchers

Forks