poedit和xml文件 [英] poedit and xml files

查看:149
本文介绍了poedit和xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何配置poedit以从xml文件提取字符串?

How to configure poedit to extract strings from xml file?

我在.xml中有Zend Framework导航项,如下所示:

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

<entry-i>
    <label>Text to translate</label>
    <params>
       ...
    <params>
<entry-i>

我希望poedit只读取<label>的消息.

And I want poedit to read just messages from <label>s.

推荐答案

我也一直在寻找解决方案,而我刚刚使它起作用了!

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

在Poedit(我有1.4.2)中,添加一个具有以下属性的新解析器(Edit > Preferences):

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

  • 语言:XML
  • 以分号分隔的扩展名列表(例如 .cpp; .h):*.xml
  • 解析器命令:xgettext --force-po -o %o %C %K %F -L glade
  • 关键字列表中的一项:-k%k
  • 输入文件列表中的一项:%f
  • 源代码字符集:--from-code=%c
  • 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

在翻译项目中,将labeltitle添加到关键字列表并更新目录.

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

这篇关于poedit和xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆