0
如標題所示,當我爲xml表單的標籤指定翻譯語言,並且將手機的語言切換爲指定語言時,應用程序本身得到正確翻譯,但表格保持英文。GeoODK在切換手機語言時收集表單不能翻譯
起初我想翻譯成阿拉伯語,我指定العربية作爲語言翻譯。什麼都沒發生。 我提到的文件,並指定「標籤::西班牙語」檢測西班牙語和翻譯時,西班牙語在手機上使用,因爲我想也許「العربية」不是阿拉伯語的正確選擇。仍然使用Español,這些表格仍未翻譯。
我需要任何有ODK收集表格翻譯經驗的人來幫助我。我用的XML:
<?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>
對不起,我查看了ODK Collect,但是我看到您的問題是指GeoODK Collect。大概是一樣的,但我不熟悉GeoODK Collect。 –
這就是它,我甚至不知道我是如何錯過這樣的事情的,我認爲更改移動設備的語言環境就足夠了,因爲它影響了應用程序本身。現在根據你的建議,它適用於我,謝謝! –