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

查看:12
本文介绍了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>s 的消息.

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

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

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

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

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