Drupal – Force Path Prefix for Default Language

13 years ago, September 26, 2011
Reading time: 1 mins

So if you want to force the default path prefix in all links. The following trick can do for you. Open the <drupal_root>/includes/language.inc and edit the language_url_rewrite() function as follows.

You have to comment the line below as shown,

case LANGUAGE_NEGOTIATION_PATH_DEFAULT:

//comment line below

/* $default = language_default();
if ($options['language']->language == $default->language) {
break;
}*/
// Intentionally no break here.
Previous
Drupal 7 – Handling file uploads – allowed file extensions
Next
Gangnam Style Bootscreen Animation for Android download
© 2024 Anil Maharjan