poedit and xml files

后端 未结 5 739
爱一瞬间的悲伤
爱一瞬间的悲伤 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:45

    I have been searching for a solution as well, and I have just gotten it to work!

    In Poedit (I have 1.4.2), add a new parser (Edit > Preferences) with the following properties:

    • Language: XML
    • List of extensions separated by semicolons (e.g. .cpp;.h): *.xml
    • Parser command: xgettext --force-po -o %o %C %K %F -L glade
    • An item in keywords list: -k%k
    • An item in input files list: %f
    • Source code charset: --from-code=%c

    In your translation project, add label and title to your keyword list and update the catalog.

提交回复
热议问题