多语言Drupal网站上可能存在陷阱? [英] Possible pitfalls on a multilingual Drupal site?

查看:82
本文介绍了多语言Drupal网站上可能存在陷阱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将踏上建立多语言Drupal网站的旅程,最有可能不得不大量使用Views,Panels和Taxonomy.我有点担心每种语言的新节点方法,尤其是使用面板.

I'm about to embark on a journey to build a multilingual Drupal site, where I will most likely have to use Views, Panels and Taxonomy pretty heaily. I am a bit worried about the new-node-for-every-language approach, especially using Panels.

到目前为止,我不具有对Panels内容类型的多语言支持,并且无法获取Current language and language neutral的内容,因此它的工作方式与我想要的类似.这似乎按预期工作,但我看到了一些问题.在某些情况下,我将不得不拥有一个特定于语言的面板(例如,未以英语发布).如果我需要所有面板都使用多语言,似乎需要进行很多工作才能将每种语言的每一列的节点放置在每种语言中.我想我可以通过以某种带有参数的视图来获取内容来解决此问题,但这很可能还会导致大量工作.

So far I've gotten it to work similarly to what I want by not having multilingual support for the Panels content-type, and fetching content that is from Current language and language neutral . This seem to work as expected, but I'm seeing some problems with it. There might be the occasion that I will have to have a language specific Panel (not published in English for example). If I need to have all my Panels multilingual, there seems to be alot of work to place the nodes for every column in every page in every language. I'm thinking I could possibly solve this by fetching the content with some kind of view with arguments, but this will most likely also lead to alot of work.

是否有某种适当的方式来做我要描述的事情,或者我有很多看似不必要的工作可以期待?

Is there some proper way of doing what I'm attempting to describe, or do I have alot of seemingly unnecessary work to expect?

推荐答案

我假设您具有i18n模块( http: //drupal.org/project/i18n )和视图"模块已安装.然后,您可以为每种语言创建一种视图-您可以在视图定义的过滤器"部分中选择语言.

I assume you have i18n module (http://drupal.org/project/i18n) and Views module installed. Then you can create a view for each language - one can choose language in "Filter" section of the view definition.

一旦有了视图,就可以将它们链接到菜单或块.问题在于,每种语言都必须具有单独的块或菜单版本,并具有正确的视图关联-Drupal正在根据配置(通常是在浏览器中设置的内容类型)选择正确的语言版本.我还没有找到更简单的方法.

Once you have views, then you can link them to menus or blocks. The problem is you must have a separate version of block or menu for every language, with a proper view associated - Drupal is choosing proper language version itself according to the configuration (typically content type set in a browser). I haven't found any easier way of doing that.

幸运的是,由于启用了i18n模块后节点具有"transalte"功能,因此准备多语言内容并不难,因此每个页面都可以使用新节点.

Fortunately preparing multilingual content is not that hard thanks to the "transalte" functionality for nodes after enabling i18n module, so new node for every page is something one can live with.

顺便说一句,您认为Drupal进行i18n的方式并不是人们能想到的最佳解决方案,这是正确的.有时候我很难受.

BTW you are right that the way Drupal is doing i18n is not the best solution one can think of. I am having hard time with it sometimes.

这篇关于多语言Drupal网站上可能存在陷阱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆