Answer the question
In order to leave comments, you need to log in
How to make Poedit templates for i18next?
Greetings! I use i18next
for translation , I
want to translate in Poedit, but I ran into a problem with templates,
in the code the translation is set as follows:
html:
js:
I set the template i18next.t and data-i18n in Poedit, but it does not see the lines for translation.
Tell me the correct templates, please, or another program.
PS The documentation for Poeidt templates does n't say anything. <li><a href="#" data-i18n="nav.home"></a></li>
var text = i18next.t('mystring');
Answer the question
In order to leave comments, you need to log in
In general, this does not depend on Poedit, but on xgettext, which in turn does not yet support custom syntax.
It was decided to write a plugin for Grant: https://www.npmjs.com/package/grunt-i18next-extrac...
which itself runs through html js files and creates a *.pot file that Poedit can open for editing. So it turned out to be more convenient - I created a task to update translations automatically when changing similarities =)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question