poedit and xml files

后端 未结 5 733
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-09 14:11

How to configure poedit to extract strings from xml file?

I have Zend Framework navigation items in .xml like this:


    
5条回答
  •  失恋的感觉
    2020-12-09 14:37

    Looks like PoEdit does not support XML yet.

    I have created a little php script, to extract the labels to .php file, which PoEdit does understand.

    $xml = simplexml_load_file("../application/configs/navigation.xml") 
       or die("Error: Cannot open XML file");
    
    echo 'xpath('//label') as $label){
      echo 'echo _("'.$label.'");'. PHP_EOL;
    }
    

提交回复
热议问题