1

I'm using LazZiya Express Localization to localize my project. I have question: Can I use LazZiya localization for js file (vuejs)? Example:

const renderVueForm = () => {
    console.log('site js');
    let html = `<div localize-content>Oh my darling i love you so. You mean everything to me.</div>`;

    return html;
};

1 Answers1

0

Put your localizable text in a hidden html div:

<div id="my-localized-text" class="d-none" localize-content>
    Oh my darling i love you so. You mean everything to me.
</div>

Then in JS get the content of the localized div:

const renderVueForm = () => {
    console.log('site js');
    let html = $("#my-localized-text").html();

    return html;
};
LazZiya
  • 5,286
  • 2
  • 24
  • 37