Press "Enter" to skip to content

[Translate Website] Simple i18n language with Vanilla Javascript | i18n-language.js

i18n-language.js is a simple i18n language with Vanilla Javascript. This JS Internationalization Library allows the user to quickly translate strings in any HTML elements.

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

Angular Multi-language Calendar Component Library

How to make use of it:

1. Load the primary JavaScript i18n-language.js at the bottom of the webpage.

<script src="i18n-language.js"></script>

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

Simple-i18n-language-A

Simple-i18n-language-B

Simple-i18n-language-C


See Demo And Download

Official Website(kyaryunha): Click Here

This superior jQuery/javascript plugin is developed by kyaryunha. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *