简体   繁体   English

realurl中的其他语言失败

[英]Additional language in realurl fails

i would like to add an additional language to start with /pt/ in an existing project. 我想在现有项目中添加一个以/ pt /开头的附加语言。 I added the language for Portugal in the backend, it was given uid=14. 我在后端添加了葡萄牙语,给出了uid = 14。

I also include this configuration in another extension, it is properly loaded, displayed in the backend "Configuration" module correctly. 我还将此配置包含在另一个扩展中,它已正确加载,正确显示在后端“配置”模块中。

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']['preVars'][0] = array(
    'GETvar' => 'L',
    'valueMap' => array(
        'de' => 1,
        ...
        'pt' => 14
    ),
    'noMatch' => 'bypass'
);

The url mydoma.in/pt is correctly resolved and has the correct language. url mydoma.in/pt已正确解析并具有正确的语言。 But a link with L=14 is not correctly encoded by the link helper to mydoma.in/pt. 但是L = 14的链接没有被链接助手正确编码到mydoma.in/pt。 Means this fluid template gives me a link with href="/" 意味着这个流体模板给了我一个与href =“/”的链接

<f:link.page additionalParams="{L:14}" addQueryString="true" addQueryStringMethod="POST,GET">portugal</f:link.page>

What can it be? 它能是什么?

Do you have set the TypoScript configuration for your new language? 您是否为新语言设置了TypoScript配置? Something like: 就像是:

[globalVar = GP:L=14]
config {
    sys_language_uid = 14
    language = pt
    locale_all = pt
    htmlTag_stdWrap.cObject.20.value = lang="pt"
}
[global]

This could not be solved by configuration. 这无法通过配置解决。 For some reason, L=14 links were once resolved to "/", probably when there was a misconfiguration. 出于某种原因,L = 14个链接曾被解析为“/”,可能是在配置错误时。 This was stored in database table tx_realurl_urldata - and was taken from there regardless what settings I made. 这存储在数据库表tx_realurl_urldata中 - 无论我做了什么设置,都从那里获取。 Deleting those entries solved the problem. 删除这些条目解决了问题。 Note: even setting enableUrlEncodeCash = 0 does not prevent realurl (2.1.2) from encoding the link using the mentioned table. 注意:即使设置enableUrlEncodeCash = 0也不会阻止realurl(2.1.2)使用提到的表对链接进行编码。 It just prevents the extension from storing new urls in that table. 它只是阻止扩展在该表中存储新的URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM