plone.app.multilanguage:Access Translated Object';s属性
环境:Plone 4.3.3,Plone.app.multilingual 2.0a4(从github签出),在我的情况下,启用了两种语言(en和zh),即双语站点 My有一个字段plone.app.multilanguage:Access Translated Object';s属性,plone,Plone,环境:Plone 4.3.3,Plone.app.multilingual 2.0a4(从github签出),在我的情况下,启用了两种语言(en和zh),即双语站点 My有一个字段remoteUrl,其定义如下: <field name="remoteUrl" type="zope.schema.TextLine"> <title i18n:translate="">URL</title> <description i18n:translate
remoteUrl
,其定义如下:
<field name="remoteUrl"
type="zope.schema.TextLine">
<title i18n:translate="">URL</title>
<description i18n:translate="">Link to the Resource.</description>
<default>http://</default>
<required>False</required>
</field>
统一资源定位地址
链接到资源。
http://
假的
我的场景是这样的:当在zh文件夹(zh/My_item)中创建项目时,remoteUrl
字段被填充,它将根据需要显示。然后,在将项目翻译成en语言(en/my_项目)时,如果en/my_项目中未填充remoteUrl
字段,我希望它显示zh/my_项目的值。另一方面,如果填写en/my_项,则其值将用于remoteUrl
字段并显示
现有的不符合我的需要,因为填充值将影响两个zh/en项目。如何从en/my_项目上下文访问zh/my_项目
remoteUrl
值?对于视图类/模板的任何提示或示例片段,我们将不胜感激。如果您只想显示另一种语言的替代值,可以从catalog index TranslationGroup访问翻译。只是个主意