如何在 Drupal 中为每种语言设置不同的主页? [英] How can I set a different homepage per language in Drupal?

查看:21
本文介绍了如何在 Drupal 中为每种语言设置不同的主页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Drupal 中为每种语言设置不同的主页?

我只使用语言环境模块(不是 i18.. 或其他翻译模块).

谢谢

解决方案

你可以在没有路径模块的情况下以一种非常简单的方式完成:

首先,到sites/default/settings.php 并将首页定义为多语言变量:

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

之后,清除缓存并转到管理 > 站点信息.您将在默认首页"下方看到:这是一个多语言变量.":

更改管理语言(通常在侧边栏中有一个语言切换器块)并更改路径,每种语言的路径都会不同.

您可以添加更多 i18n_variables 以根据语言更改站点信息中的其他内容,即站点名称、口号、使命.更多信息请访问:

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

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

thanks

解决方案

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:

这篇关于如何在 Drupal 中为每种语言设置不同的主页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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