diff --git a/includes/locale.inc b/includes/locale.inc index c168da0..f795d64 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -409,6 +409,8 @@ function locale_language_switcher_session($type, $path) { * Rewrite URLs for the URL language provider. */ function locale_language_url_rewrite_url(&$path, &$options) { + print_r($options); + die(); static $drupal_static_fast; if (!isset($drupal_static_fast)) { $drupal_static_fast['languages'] = &drupal_static(__FUNCTION__); @@ -457,6 +459,10 @@ function locale_language_url_rewrite_url(&$path, &$options) { $options['base_url'] = str_replace('https://', 'http://', $options['base_url']); } } + + // Add Drupal's subfolder from the base_path if there is one. + $options['base_url'] .= rtrim(base_path(), '/'); + } break;