There are a lot of approaches to internationalization, but this project offers unique advantages such as the following.
- Inline translation in HTML documents
- Lightweight implementation of JS 48 lines
- Written in pure HTML / CSS / JS language so that beginners can use it easily
- On the first visit, language is set as the browser setting value, and if there is no value specified, English is displayed first
- When the language is changed, it is stored in the local storage and displayed in the corresponding language upon re-visit
How to make use of it:
2. Define a number of languages for blocks of text as follows:
<h4 data-lang="ko"> // Add text Here </h4> <h4 data-lang="en"> // Add text Here </h4> <h4 data-lang="jp"> // Add text Here </h4>
3. Create a dropdown choose to switch between languages.
<select id="change-language"> <option value="ko" selected="selected"> Korean </option> <option value="en"> English </option> <option value="jp"> Japanese </option> </select>
Translate Text In Elements, i18n-language JS Plugin/Github
See Demo And Download
Official Website(kyaryunha): Click Here