A
A
Alex2015-05-19 21:29:17
JavaScript
Alex, 2015-05-19 21:29:17

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

2 answer(s)
R
Roman Hinex, 2015-05-19
@HiNeX

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.

E
Evgeny Kumanin, 2015-05-20
@jackkum

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 question

Ask a Question

731 491 924 answers to any question