Localizing text from XML files
-
30-10-2019 - |
Question
Do you guys know any way I could automatically pick up strings from .xml files and store them in a .po / .pot file, just like PoEdit does with the ones from .php files?
The XML structure looks like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<options>
<page id="content" label="Content Options" icon="4">
<section id="post" label="Content Options">
<option id="title" type="checkbox" default="yes" label="Show post title"></option>
<option id="comments" type="checkbox" default="yes" label="Show comments link"></option>
<option id="thumb_size" type="select" default="default" label="Thumbnail Size">
<value id="default" label="Default Size, (%s)" vars="default_size"></value>
<value id="100x100" label="Small (100x100)"></value>
<value id="150x150" label="Medium (150x150)"></value>
<value id="200x200" label="Large (200x200)"></value>
</option>
</section>
</page>
</options>
Strings within the "label" attribute should be detected by a gettext parser or something...
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange