Skip to content

Convert your website in multilingual in few lines of code. (best alternative of i18n)

Notifications You must be signed in to change notification settings

sudhir600/jQuery-Saral-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery-saral-i18n

i18n easy Implementation using jQuery   (Github or NPM)


Note- this is very easy plugin for localization using jQuery. You need to spend only 5 minute to setup and ready to go.

How To Setup

  • Download saral-i18n.js under js folder. or run - npm i jquery_saral_i18n
  • Paste this script file in your project directory (problily in "js" or "script" folder).
  • Go to your html page wheere you want to impliment. add this script into section.
  • Go to your project directory and create a folder called "locale". and inside locale, create en.json. (you can copy the locale folder from this repo.
  • Now download demo.html and see how attribute has beed added to catch the key. see uses section.

Uses

place i18n="key" in any element just like this.
or you can call i18n_placeholder="key" for input placeholder.
<input type="text" i18n="buttonTxt" i18n_placeholder="inputPlchdr">
<input type="radio" checked i18n="localtion2">
<input type="button" i18n="location1">
<input type="checkbox" i18n="location2">
<button i18n="buttonTxt"></button>
<select>
<option selected i18n="location1"></option>
<option i18n="location2"></option>
</select>
<textarea i18n="divTxt" rows="4" cols="45"></textarea>
<div i18n="divTxt">text from english</div>
<span i18n="spanTxt">text from english</span>


Author



Note - If you think that something need to be change, feel free to send pull request. I will merge into master.

About

Convert your website in multilingual in few lines of code. (best alternative of i18n)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published