la runeta se agita

Martin Sarsale - aka @runixo - martin@malditainternet.com
Jul 25
Permalink

i18n message in a bottle: extract gettext strings from a javascript file

This is a (translated) message in a bottle, leaving it here for use by the following generations: if you ever need to extract gettext strings to generate a .po file from something which is not PHP but looks like (like, javascript), you can do this nasty trick (which probably do not works 100% but I’ve nothing better)

(echo “<?”; cat bla.js; echo “?>”;) | xgettext -j -L php
Comments (View)
blog comments powered by Disqus