How can I set a different homepage per language in Drupal?

一个人想着一个人 提交于 2019-12-19 11:43:40

问题


How can I set a different homepage per language in Drupal ?

I'm only using locale module (not i18.. or other translations module).

thanks


回答1:


You can do it without path module in a very simple fashion:

First of all, go to sites/default/settings.php and define the frontpage as multilingual variable:

$conf['i18n_variables'] = array('site_frontpage');

After that, clear cache and go to admin > Site Information. You will see that below "Default front page" there will be: "This is a multilingual variable.":

change the admin language (usually there is a block of language switcher in the sidebar) and change the path, The path will be different for each language.

You can add more i18n_variables to change other things in site information according to language i.e site name, slogan, mission. more information at:




回答2:


try this

http://drupal-translation.com/content/setting-front-page-language




回答3:


And if you want this to actually work, because there's an annoying bug in setting a default homepage for different languages, as we're used to having ridicolous bugs in Drupal, you have to change the url in orde to properly set the default front page. This is because the language prefix remains the same when switching languages. Amazing isn't it.

So change /nl/admin/config/system/site-information to /en/admin/config/system/site-information

To actually make this work.



来源:https://stackoverflow.com/questions/4213748/how-can-i-set-a-different-homepage-per-language-in-drupal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!