Webflow multilingual support library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.babelrc
.gitignore feat: init commit Nov 14, 2018
.prettierignore feat: add min file Nov 23, 2018
README.md
index.html
index.js feat: ie11 support Nov 23, 2018
index.test.js test: add initial test Nov 23, 2018
package-lock.json
package.json
rollup.config.dev.js feat: init commit Nov 14, 2018
rollup.config.prod.js
webflow-multilingual.js
webflow-multilingual.js.map
webflow-multilingual.min.js
webflow-multilingual.min.mjs
webflow-multilingual.mjs
webflow-multilingual.mjs.map feat: ie11 support Nov 23, 2018

README.md

https://img.shields.io/npm/v/webflow-multilingual.svg

Webflow Multilingual

Fork from http://multilinguale.webflow.io

Only support modern browsers

Install

<script src="https://unpkg.com/webflow-multilingual/webflow-multilingual.js"></script>

Usage

Text node

<p>[[ko]] 안녕 [[en]]hello</p>

Class

<p class="wm-ko">안녕</p>
<p class="wm-en">hello</p>

Attribute (not yet)

<p data-wm-lang="ko">안녕</p>
<p data-wm-lang="en">hello</p>

Select language by URL query string parameters

https://your-awesome-site.site?lang=ko
https://your-awesome-site.site?lang=en

Select language by button

<button data-wm-sel="ko">한국어</button>
<button data-wm-sel="en">English</button>

Switch language

<button data-wm-switch>Switch</button>