首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GeoODK收集在转换电话语言时没有翻译的表单

GeoODK收集在转换电话语言时没有翻译的表单
EN

Stack Overflow用户
提问于 2015-01-16 22:51:00
回答 1查看 184关注 0票数 0

正如标题所述,当我为xml表单的标签指定一种翻译语言,并将我的手机语言切换到指定的语言时,应用程序本身就会得到正确的翻译,但表单仍然是英文的。

起初,我想翻译成阿拉伯语,我指定العربية为语言翻译。什么都没发生。我参考了文档,并指定了“标签::Espa”来检测西班牙语,并在电话中使用西班牙语时进行翻译,因为我认为"العربية“可能不是阿拉伯语的正确选择器。尽管如此,这些表格仍未翻译。

我需要任何在ODK方面有经验的人收集表单翻译来帮助我。我使用的XML:

代码语言:javascript
复制
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <h:head>
        <h:title>arabic sample</h:title>
        <model>
          <itext>
            <translation default="true()" lang="default">
              <text id="/sampletest/select_example/yes:label">
                <value>Yes</value>
              </text>
              <text id="/sampletest/select_example/no:label">
                <value>No</value>
              </text>
              <text id="/sampletest/select_example:label">
                <value>This is a select_one type question.</value>
              </text>
            </translation>
            <translation lang="العربية">
              <text id="/sampletest/select_example/yes:label">
                <value>نعم</value>
              </text>
              <text id="/sampletest/select_example/no:label">
                <value>كلا</value>
              </text>
              <text id="/sampletest/select_example:label">
                <value>اختر واحد</value>
              </text>
            </translation>
          </itext>
          <instance>
            <sampletest id="arabic sample">
              <select_example/>
              <required_text/>
              <datetime_test/>
              <geopoint_test/>
              <meta>
                <instanceID/>
              </meta>
            </sampletest>
          </instance>
          <bind nodeset="/sampletest/select_example" type="select1"/>
          <bind nodeset="/sampletest/required_text" required="true()" type="string"/>
          <bind nodeset="/sampletest/datetime_test" type="dateTime"/>
          <bind nodeset="/sampletest/geopoint_test" type="geopoint"/>
          <bind calculate="concat('uuid:', uuid())" nodeset="/sampletest/meta/instanceID" readonly="true()" type="string"/>
        </model>
      </h:head>
      <h:body>
        <select1 ref="/sampletest/select_example">
          <label ref="jr:itext('/sampletest/select_example:label')"/>
          <hint>In the type column you must include the name of a choices list that sets the available options. Choices lists are specified on the choices sheet.</hint>
          <item>
            <label ref="jr:itext('/sampletest/select_example/yes:label')"/>
            <value>Yes</value>
          </item>
          <item>
            <label ref="jr:itext('/sampletest/select_example/no:label')"/>
            <value>no</value>
          </item>
        </select1>
        <input ref="/sampletest/required_text">
          <label>Required field</label>
          <hint>You have to enter something to continue.</hint>
        </input>
        <input ref="/sampletest/datetime_test">
          <label>Enter a date and a time:</label>
        </input>
        <input ref="/sampletest/geopoint_test">
          <label>Record your location:</label>
          <hint>GPS coordinates can only be collected when outside.</hint>
        </input>
      </h:body>
    </h:html>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-17 00:07:05

我觉得你的XForm可能没问题。加载表单后,您是否在ODK集合中切换了表单语言?(在窗体视图中单击菜单按钮)。我相信这是改变形式语言的唯一方法。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27994040

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档