A module for multi-language web sites, allowing users to access content in languages other than the current one by using path aliases.

How it works

By setting newly created and updated path aliases as language neutral.

Use case

Different users may have different language preferences.
For example, not everyone likes translated administration pages.

Usually when a user creates a node or a taxonomy term, a path alias is automatically generated. The language of this alias matches that of the user. This creates a major inconvenience, namely, path aliases don't work for users with different language preferences. For example, they can only accept the nodes using a regular /node/[nid] path.

Installation & configuration

Install the module as usual.

After the installation go to the configuration page admin/config/search/path/language_settings.

Drupal 7 version

Statistics for path alias languages are displayed.

Previously created paths can be bulk updated at module's configuration page.
It is also possible to revert changes to nodes paths made by this module.

There two modes of operation, manual and automatic:

  • One can manually reset all the aliases referring to nodes, taxonomy terms and user pages to be language neutral. There is also a possibility to set a language of node path aliases to match that of corresponding nodes, thus reverting the changes made by the module (not implemented for other entity types yet).
  • One can also configure the module to automatically reset language settings for newly created nodes, terms and users.

Drupal 8 version

The Drupal 8 version of the module depends on pathauto and all the alias types supported by pathauto can be configured to be language neutral.

The module only handles automatically created paths (at least until #2858910: Add back support for manual aliases gets fixed, which depends on #683510: Add hook_path_alter()).

And it does not offer custom options for updating existing path aliases either, however previously created paths can be updated using pathauto bulk update functionality.

NOTE: language neutral paths do not play well with the Drupal 8 entity translation mechanism used in a multi-language site (see #2336037: Entity translation compatibility).

Neutral paths still have sense in the original use case: a site with content in a single language with user languages different from the site language, to allow users to still use the aliases.

To handle path alias in multi-language Drupal 8 sites, take a look at the approaches in the Language neutral aliases and Alias Language Negotiation modules.

Project information