I want to have 2 languages: English [en] and Bulgarian [bg], with both using path prefixes. The problem is that whatever default language I set ("bg" or "en"), it doesn't add path prefix to URLs. (I've changed English to have "en" path prefix.) The cause of the problem seems to be the following lines in includes/language.inc:
case LANGUAGE_NEGOTIATION_PATH_DEFAULT:
$default = language_default();
if ($options['language']->language == $default->language) {
break;
}
// Intentionally no break here.
case LANGUAGE_NEGOTIATION_PATH:
if (!empty($options['language']->prefix)) {
$options['prefix'] = $options['language']->prefix .'/';
}
break;
So if we have default language and LANGUAGE_NEGOTIATION_PATH_DEFAULT, no path prefix is added. This if...break surely is there for some reason but commenting the break fixes my problem.
Comments
Comment #1
drewish commenteddoh just found this, i created another issue:
#244162: Links not rewritten to include prefixes with 'Path prefix only' language negotiation
but since mine has a patch i'm going to mark yours as the duplicate.