Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

259
Vistas
Jquery.i18n not working when using a path of a json file

index.html

When i use jquery i18n plugin by giving the path of a json file its not working, it is printing the data-i18n value instead.

This is working

when i give the object here its working as i want.

I want to use the path method instead of writing the key-value pairs of translation objects inside html file

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

 $.i18n().load({
        'en': 'assets/i18n/en.json',
        'ar': 'assets/i18n/ar.json',
    }).done(function () {
        $('body').i18n();
    });

This made the code work. I think the translation should only take place after the json file is loaded.

The script is going to traverse all elements inside body and replace their contents with the messages under the provided translation keys. If the key cannot be found, the initial content will be displayed as a fallback. -- source -

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda