Question

This is something I am trying so hard to get. tried a bunch of options, including this one found here Extracting gettext strings from Javascript and HTML files (templates). No go.

this is the sample html

<h1 data-bind="text: _loc('translate this')"></h1>

the command I have tried (php, glade..)

xgettext -LPHP --force-po -o E:\Samples\poEdit\translated.po --from-code=utf-8 -k_loc E:\Samples\poEdit\html\samplePO.html

glade seems to look only inside tags and completely skips the keyword. Anyone solve this problem?

Was it helpful?

Solution

We eventually ended up writing a small .net application to parse the html and create a json representation and used language PYTHON with xgettext to create the po file from javascript.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top