是否可以翻译自定义内容类型的视图路径/标题?
我是 Drupal 的新手。
我安装了带有 i18n 模块的 Drupal。
一切都很完美,但我遇到了一个问题。
我创建了自定义内容类型和一个显示它的视图。现在我有一个问题...是否有可能翻译视图路径/标题?
问候, 戴夫·W
I'm a newcomer to Drupal.
I have a Drupal installation with i18n module.
Everything works perfectly however I faced one issue.
I created custom content type and a view to display it. Now I have a quesiton... Is there any possibility to translate view path/title?
Regards,
DaveW
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于所有开始 Drupal 冒险的人来说都是一个众所周知的问题。
如何解决问题?这非常非常简单。我假设您已创建并启用了语言 - 我将使用英语作为默认语言。
管理 » 配置 » 搜索和元数据 » URL 别名
并通过单击添加新别名
链接创建新别名(如果此模块已禁用,您需要启用它)。现有系统路径
字段中提供您创建的视图的英文路径:在我们的例子中,它是news
。路径别名
字段中提供您的翻译,即。 wiadomosci 波兰语。瞧。现在,当波兰语是当前语言时,它将使用别名
wiadomosci
作为news
路径。注意:刚刚在最新的 Drupal 安装上进行了测试 - 工作完美。
Well known issue for all people starting their adventure with Drupal.
How to solve the problem? It's very, very simple. I presume you have your languages created and enabled - I'll use English as default language.
Administration » Configuration » Search and metadata » URL aliases
and create new alias by clickingAdd new alias
link (if this module is disable you need to enable it).Existing system path
field provide the English path of the view you created: in our case it'snews
.Path alias
field provide your translation, ie. wiadomosci for Polish language.Voila. Now, when Polish is the current language, it will use an alias
wiadomosci
fornews
path.Note: Just tested on fresh latest Drupal installation - works perfectly.
如果您看这里:
http://reyero.net/en/drupal/drupal7_i18n_beta1_overview (这是模块作者的页面)
他显示了用于启用分类术语翻译的选项,这将是到达实际页面的路径 - 例如作为您为内容设置的类别。
还有一个节点复选框,这将是您的内容。人们可能会认为这会翻译 url 或节点内容。
他的网站似乎没有将网址翻译成西班牙语,而只是更改了菜单项。 URL 回退到节点号,而不是之前显示的别名。
也许这有帮助,或者这对你来说已经很明显了,但我会尝试使用这些选项。
很好的概述 - http://evolvingweb.ca/story/drupal-7 -多语言-whats-new-i18n
似乎暗示有一种方法可以翻译节点 - 不确定是否必须硬编码或者是否会自动发生 - 不过看起来很有希望。
本指南可能也会有所帮助:http://drupal.org/node/133977
If you take a look here:
http://reyero.net/en/drupal/drupal7_i18n_beta1_overview (This is the module author's page)
He shows options for enabling translation of taxonomy terms, which would be the path up to your actual page - such as categories you've set up for your content.
There is also a tickbox for node, which would be your content. One would think that this would translate the either the url or the node content.
His site doesn't seem to translate to the url to spanish, but just changes menu items. The URL falls back to the node number instead of the alias which was previously displayed.
Maybe this helps or maybe this is already obvious to you, but I would tray playing with those options.
Nice overview - http://evolvingweb.ca/story/drupal-7-multilingual-whats-new-i18n
Seems to imply that there is a way to translate the nodes - not sure if you have to hard code or if it will happen automatically - looks promising though.
This guide might be helpful as well: http://drupal.org/node/133977
最简单的方法似乎是使用国际化视图模块:https://drupal.org/project/i18nviews 。
The easiest way seems to be to go with the Internationalisation Views module: https://drupal.org/project/i18nviews.