https://github.com/lullaby6/language-redirect.js
JavasScript Library - Do languages redirects
https://github.com/lullaby6/language-redirect.js
java-script javascript javascript-lib js js-lib js-library
Last synced: 5 months ago
JSON representation
JavasScript Library - Do languages redirects
- Host: GitHub
- URL: https://github.com/lullaby6/language-redirect.js
- Owner: lullaby6
- Created: 2024-09-04T18:14:52.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-10T13:56:16.000Z (6 months ago)
- Last Synced: 2025-01-10T14:52:32.221Z (6 months ago)
- Topics: java-script, javascript, javascript-lib, js, js-lib, js-library
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# language-redirect.js
A lightweight and easy-to-use js library to redirection for support differents languages.
## Installation
#### CDN
Include this tag in your html `head`
```html
```
#### Download
Download and include the downloaded file in your project:
```html
```
## Usage
#### in HTML
In your script tag you can use the `data-language-redirect` attribute for config the redirects easly:
```html
```
#### in JavaScript
Also you can use the `languageRedirect` function to config the redirects via JavaScript:
```js
languageRedirect({
es: '/es/index.html'
});
```