Magento 翻译和 url 键

Magento translation and url key

我有一个 Magento 网站,其中一些页面链接到主导航。 例如,在我的默认视图(意大利语)中,我有 www.example.com/italian-url-key 然后我用 url www.example.com/english-url-key

创建了另一个英文页面

因此,当我在页面的意大利语版本上并尝试切换到英语版本时,这是 magento 生成的 url:http://www.example.com/italian-url-key/?___store=english&store=&___from_store=default 并在单击时显示 404 页面.

我该如何解决?我需要链接这 2 个页面,如果 url 键不同也是如此。

非常感谢!

开箱即用的 Magento 不支持 URL 翻译,两个页面需要相同的 URL 键。查看 Magento Docs on how to translate CMS pages.

中的说明

To translate a CMS page, you must create a new page that has the same URL Key as the original, but assigned to the specific store view.

因此,您要么必须为您的 URL 坚持使用一种语言,要么必须使用 develop/acquire 模块来为您执行此操作。 magento-language-roots or CMSRewrites 模块看起来都能为您实现这一目标。

您可能还想考虑将 Hreflang tags 添加到您的 head.phtml,因为您有一个多语言网站。