Closed ChristophKind closed 6 years ago
Oh i also recognized, that the dynamic content isnt translated. Am I missing some option ?
Did you check the sample...https://github.com/i18next/i18nextify/blob/master/example/index.html#L95 at least seems to work there
Yes i checked it. Soo, it works if you add new elements with createelement + appendChild. But if you change only the text (innerHtml) of an element it does not work.
Please try it in your example with document.getElementById("testdiv").innerHTML = "New text!";
If this is the only change, the saveMissing url is not called.
Yes...changing innerHtml won't work...because it already gone through that element...it's flagged translated.
You would need replace the full element or directly set translated content to innerHmtl using the i18next instance
i18nextify.i18next.t('key', options);
-> https://www.i18next.com/translation-function/essentials#accessing-keys
hmm okay. is there no other posibility ?
i guess no...you might try around...eventual removing the translated attributes on that element and setting innerHtml afterwards does the trick...idk
Hey,
i have a problem with the saveMissing - Option an dynamic content. When the page loads, everything is fine and saveMissing is fired well. But after 3 seconds some content on my page is loaded dynamicly. I want to fire saveMissing again after the content is loaded into the dom, but nothing happens.
Can you help me?