typo3 extbase本地化,遵循父母的关系?
我一直在研究和测试Typo3的扩展系统的本地化系统,我感到非常困惑。我的主要问题如下所述,在本地化和国际化扩展 文档:
设置typo3querysettings-> langagingoverlaymode try true true true true true extbase从默认语言中获取记录,并用翻译值[...]叠加它们,extbase读取了从翻译的记录中读取关系(因此不可能从字段值中继承一个字段值。翻译来源),然后通过$ pagerepository-> getRecordoverlay()。
通过相关记录
为什么它这样起作用,而不仅仅是遵循默认记录的关系(sys_lang_uid
= 0)?由于它是这样起作用的,例如,如果您想将网站转换为4种语言,则必须维护相同的数据库关系4次(包括MM记录)。例如,对于我的博客,如果某人在德语中使用它会更改一篇文章并将其链接到另一篇文章,则此更改仅针对德语网站而不是英语网站进行。
我正在描述的内容类似于用于本地化内容作品的连接模式,您只希望翻译的字段的翻译记录,所有Elese(包括关系)都从默认一个中获取。是否有任何方法可以遵循所有语言的默认记录的关系?
非常感谢
这里的是语言
我网站配置的一部分:
languages:
-
title: English
enabled: true
languageId: 0
base: /
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-US
direction: ltr
flag: en-us-gb
solr_core_read: core_en
-
title: German
enabled: true
languageId: 1
base: /de/
typo3Language: default
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: German
hreflang: de-DE
direction: ltr
flag: de
solr_core_read: core_de
websiteTitle: ''
fallbackType: strict
fallbacks: ''
-
title: Spanish
enabled: true
base: /es/
typo3Language: es
locale: es_ES.UTF-8
iso-639-1: es
websiteTitle: ''
navigationTitle: Spanish
hreflang: es-ES
direction: ltr
fallbackType: strict
fallbacks: ''
flag: es
solr_core_read: ''
languageId: 3
I've been researching and testing TYPO3's localization system for extensions and I'm very confused. My main problem with it is described below, in the section named TYPO3 v9 and higher
in the Localizing and internationalizing an extension
documentation:
Setting Typo3QuerySettings->languageOverlayMode to true makes Extbase fetch records from default language and overlay them with translated values [...] For relations, Extbase reads relations from a translated record (so it’s not possible to inherit a field value from translation source) and then passes the related records through $pageRepository->getRecordOverlay().
Why does it work like this instead of just following the relations of the default record (sys_lang_uid
= 0)? Since it works this way, e.g. if you want to translate your website to 4 languages you have to maintain the same database relationships 4 times (including MM records). For example, for my Blog, if someone using it in German changes one Article and links it to another one, this change is only done for the German website, not the English one.
What I'm describing would be akin to how connected mode for Localized content works, you only want the translated records for the translated fields, everything elese (including relations) are taken from the default one. Is there any way of making it follow the relations of the default record for all languages?
Thanks a lot in advance
Here is the languages
part of my site config:
languages:
-
title: English
enabled: true
languageId: 0
base: /
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-US
direction: ltr
flag: en-us-gb
solr_core_read: core_en
-
title: German
enabled: true
languageId: 1
base: /de/
typo3Language: default
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: German
hreflang: de-DE
direction: ltr
flag: de
solr_core_read: core_de
websiteTitle: ''
fallbackType: strict
fallbacks: ''
-
title: Spanish
enabled: true
base: /es/
typo3Language: es
locale: es_ES.UTF-8
iso-639-1: es
websiteTitle: ''
navigationTitle: Spanish
hreflang: es-ES
direction: ltr
fallbackType: strict
fallbacks: ''
flag: es
solr_core_read: ''
languageId: 3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论