public function replaceLanguage($path, $language, $replacement = null)
    {
        $path = $this->stripLanguage($path, $language);
        $path = $this->prependLanguage($path, $replacement);

        return $path;
    }
public function replaceLanguage($path, $language, $replacement = null)
    {
        $path = $this->stripLanguage($path, $language);
        $path = $this->prependLanguage($path, $replacement);

        return $path;
    }
public function replaceLanguage ( $ path , $ language , $ replacement = null ) { $ path = $ this -> stripLanguage ( $ path , $ language ) ; $ path = $ this -> prependLanguage ( $ path , $ replacement ) ; return $ path ; }
Replace the language in the URI

@param  string  $path
@param  string  $language    The language being searched for.
@param  string  $replacement Optional. The language that replaces $lang. Defaults to the current language.

@return string
Replace the language in the URI