original_string: public function localePrefix($url)
      {
          if (option('url_locale_prefix') &&
              str_starts_with($url, '/') &&
              !preg_match('/^\/' . $this->_localesPattern() . '/', $url)
          ) {
              $url = '/' . I18n::locale() . $url;
          }
  
          return $url;
      }
code: public function localePrefix($url)
      {
          if (option('url_locale_prefix') &&
              str_starts_with($url, '/') &&
              !preg_match('/^\/' . $this->_localesPattern() . '/', $url)
          ) {
              $url = '/' . I18n::locale() . $url;
          }
  
          return $url;
      }
code_tokens: public function localePrefix ( $ url ) { if ( option ( 'url_locale_prefix' ) && str_starts_with ( $ url , '/' ) && ! preg_match ( '/^\/' . $ this -> _localesPattern ( ) . '/' , $ url ) ) { $ url = '/' . I18n :: locale ( ) . $ url ; } return $ url ; }
docstring: Prepends language code to the given URL if the "url_locale_prefix" directive
  is enabled.
  
  @param string $url The URL to fix
  @return string Locale prefixed URL
docstring_tokens: Prepends language code to the given URL if the url_locale_prefix directive is enabled .