Translation Plugin

Translate your text

If you want to translate your application in several languages, you can do it using a Jquery plugin.

Hi, my name is John

Buy now

Register for free

Save and publish

Create a new article

How to use translator plugin?

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

  1. Add necessary script at the bottom of your page:
    <script src="../assets/global/plugins/translator/jqueryTranslator.min.js"></script>
    <script src="../assets/global/js/pages/translation.js"></script>
  2. Add data-translate attribute with a value to each element you want to translate, like this for example:
    <p data-translate="register-free">Register for free</p>
  3. Create a json file for each language you want to create. For example, for spanish translation, you will have a file named translate-es.json:
    {
      "name-john" : "Hola, me llamo John",
      "buy-now" : "Comprar ahorra",
      "register-free" : "Registrarse gratis",
      "save-publish" : "Guardar y publicar",
      "create-article" : "Crear un nuevo artículo"
    }
  4. If needed, you can edit translation function in admin/assets/global/js/pages/translation.js file. You can change for example your select input id or default language.