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

后端 未结 3 1926
伪装坚强ぢ
伪装坚强ぢ 2021-01-16 00:50

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

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

thanks

3条回答
  •  难免孤独
    2021-01-16 01:18

    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.": alt text

    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:

提交回复
热议问题