Exclude /ru/ in links I have site http://diamant-group.com/. It has two languages RU and EN, I want that it will monolingual, with Russian default language. I turn off EN language in Configuration, turn on RU as default, but problem is still exist http://diamant-group.com/ru/catalog. When I begin to research I have opened that many code for multilingual function was added inside theme template. When I turn off module Content translate i have error of function diamant_link_lang.  

How to correct this code, that links do not consist /ru/ (for example site/ru/catalog/watches/mechanical/omega/ - > site/catalog/watches/mechanical/omega/), but language of the result pages must be Russian:

function diamant_link_lang($language, $path, $path_alt) {
    $path_lang = translation_path_get_translations($path_alt[0] . '/' . $path_alt[1], $language);
    file_put_contents(DRUPAL_ROOT . '/sites/default/files/text.txt', 'path_lang: ' . print_r($path_lang, true) . "\n");
    if ($language == 'ru' &amp;&amp; isset($path_lang['en']))
 {
        return 'en/' . drupal_get_path_alias($path_lang['en'], 'en');
    }
    if ($language == 'en' &amp;&amp; isset($path_lang['ru'])) {
        return drupal_get_path_alias($path_lang['ru'], 'ru');
    }
    return $language == 'ru' ? 'en' : 'ru';
}
You can change the way the language is added to the url. For the Russian language (your default language), you can remove it completely from the url by setting the path prefix to empty value.

This can be done under admin/config/regional/language/edit/ru, set empty value on Path prefix language code.

Theoretically you don't need to have custom code the generate URL (with language checks), just let Drupal handle the url generation.