public function prependLanguage($path, $language = null)
    {
        $prepend = ( isset($language) ? $language : $this->getLanguage() );

        if ( strlen($prepend) > 1 ) {
            return $prepend . (strpos($path, '/') === 0 ? $path : '/' . $path);
        }

        return $path;
    }
public function prependLanguage($path, $language = null)
    {
        $prepend = ( isset($language) ? $language : $this->getLanguage() );

        if ( strlen($prepend) > 1 ) {
            return $prepend . (strpos($path, '/') === 0 ? $path : '/' . $path);
        }

        return $path;
    }
public function prependLanguage ( $ path , $ language = null ) { $ prepend = ( isset ( $ language ) ? $ language : $ this -> getLanguage ( ) ) ; if ( strlen ( $ prepend ) > 1 ) { return $ prepend . ( strpos ( $ path , '/' ) === 0 ? $ path : '/' . $ path ) ; } return $ path ; }
Prepend the language to the URI

@param  string  $path
@param  string  $language    Optional. The language tho prepend. Defaults to the current language.

@return string
Prepend the language to the URI