Answer the question
In order to leave comments, you need to log in
Can JavaScript work with .po translation files?
Are there any functions for working with .po or .mo translation files?
Maybe some jQuery plugins?
And is it worth using them at all? Maybe it's easier and faster to parse .json with strings to translate?
Answer the question
In order to leave comments, you need to log in
JSON here will be more appropriate and faster in any case. And why parse if you can just load it and use it as an object right away.
angular-gettext when used with grunt, it turns out very convenient.
The site is written in one language, and wherever a translation is needed, the translate directive is substituted.
Then *.po files are created for the required languages and when building the project, the grunt add-on creates json, which is already used in the gettext directive.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question