Search code examples
internationalizationseedstack

how can add i18n in js for internationalization


I have a control with jquery, when I do the one respecting the internationalization it considers it as a chain and do not do the translation, I think the way by which one declares the internationalization in js and differenet of html

this is my code js:

       $("#borne").attr("placeholder", "{{ 'key.borne.vide' | localize }}");

Any idea please!!!


Solution

  • It seems you're using W20-framework for the front of your application. If so, a localize function is provided out-of-the-box by this framework (in angular CultureService).

    This function should able you to translate your messages in the GUI. Be sure to add a dependency on 'CultureService' in your angular module / controler.