php - i18next localization and javascript -
i working i18next localization javascript. since combining php , javascript , need have localization 3 languages (en,de,fr) facing little problem. today started work first time i18next library , working fine when translating normal tags div,ul,... problem facing pictures. since need have every language different image not sure possible i18next library, set value in tag parameters. example:
document.write('<form action="dropzone.php" enctype="multipart/form-data" class="dropzone" style="background-image: url(languages/fr/design.png);" method="post"><div class="fallback" data-i18n="design"><input name="file" type="file" multiple /></div></form>'); and thing need alter here style, part:
style="background-image: url(languages/fr/design.png);" this not same, design.png image different depending on language setting url, example:
localhost/designer/box/test.php?lang=fr is there way alter i18next library, every lang different image path, this:
url(languages/en/design.png) url(languages/de/design.png) url(languages/fr/design.png) inside document.write? or there way value lang parameter in url in javascript (without regex, lastly solution create regex)?
javascript php jquery i18next
No comments:
Post a Comment