public static function pathPrefixedByLangCode($string)
    {
        if (strlen($string) <= 3) {
            return false;
        }

        $languages_enabled = Grav::instance()['config']->get('system.languages.supported', []);
        $parts = explode('/', trim($string, '/'));

        if (count($parts) > 0 && in_array($parts[0], $languages_enabled)) {
            return true;
        }

        return false;
    }
public static function pathPrefixedByLangCode($string)
    {
        if (strlen($string) <= 3) {
            return false;
        }

        $languages_enabled = Grav::instance()['config']->get('system.languages.supported', []);
        $parts = explode('/', trim($string, '/'));

        if (count($parts) > 0 && in_array($parts[0], $languages_enabled)) {
            return true;
        }

        return false;
    }
public static function pathPrefixedByLangCode ( $ string ) { if ( strlen ( $ string ) <= 3 ) { return false ; } $ languages_enabled = Grav :: instance ( ) [ 'config' ] -> get ( 'system.languages.supported' , [ ] ) ; $ parts = explode ( '/' , trim ( $ string , '/' ) ) ; if ( count ( $ parts ) > 0 && in_array ( $ parts [ 0 ] , $ languages_enabled ) ) { return true ; } return false ; }
Checks if the passed path contains the language code prefix

@param string $string The path

@return bool
Checks if the passed path contains the language code prefix