Drupal: "All Languages" as the default alias language on a multilingual site

In a multilingual Drupal 7 site, when a node is created with a language set to something other than "Language Neutral", its alias does not work (error 404) when the language of the site is different from the language of node.

You can avoid this problem by changing the alias language to โ€œAll languagesโ€ on the alias editing page (admin / config / search / path).

This is very annoying because you have to do this for every new node with language support. Moreover, when Bulk update changes some aliases, this parameter is lost.

Is there a way to get "All Languages" for each newly created alias?
Is there a way to get "All Languages" for all aliases already created?

+4
source share
2 answers

you must add this code to your .php template

function youtheme_node_presave($node) { if ($node->type == 'nodetype') { $node->language = LANGUAGE_NONE; } } 

this will basically keep your nodes in a neutral language;) change the nodetype or add more if you need to.

+4
source

The above worked for me (from: http://bengoodyear.com/blog/drupal-7-cracking-the-multilingual-front-page-nut ), but it happened.

Make sure that you have the Variables and Variables Translations modules enabled. Go to admin / config / region / i18n / variable Select "Default Start Page" in the list, save the settings. Goto admin / config / system / site-information, you will see a block of text that talks about some of your settings, which are multilingual variables and a list of links for the languages โ€‹โ€‹you work in, which allow you to set parameters for each language.

0
source

All Articles