Translation jQueryTranslator is a jQuery plugin which allows developers to translate a static web site easily.

Select your language to test

Hey, I am John Doe.

Buy coffee now

Register new task

Save your item and publish

Usage & Documentation

Translation here is easy. Just follow this steps to make your app translation ready:

Add class .trn to each element you want to translate, like this for example:


<p class="trn">Hey, I am John Doe.</p>

Create a Dictionary in your JS file with the translations


var dict = {
  "Hey, I am John Doe.": {
    en: "Hey, I am John Doe.",
    ch: '嘿,我是李四。',
    es: "Hola, me llamo John",
    fr: 'Bonjour, mon nom est John'
  },
        

Call the plugin!


var translator = $('body').translate({ lang: 'en', t: dict }) // language and dictionary to use
translator.lang('ch') // output language 
translator.get('Hey, I am John Doe.') // get the text for translation