original_string: public function language($code, $path = '', $options = array())
      {
          $segments = $this->getSegments(true, $path);
          $langcode = $this->request->getLangcode();
  
          if (isset($segments[0]) && $segments[0] === $langcode) {
              unset($segments[0]);
          }
  
          array_unshift($segments, $code);
  
          $url = $this->request->base(true) . trim(implode('/', $segments), '/');
          $url = empty($options) ? $url : "$url?" . http_build_query($options);
  
          return filter_var($url, FILTER_SANITIZE_URL);
      }
code: public function language($code, $path = '', $options = array())
      {
          $segments = $this->getSegments(true, $path);
          $langcode = $this->request->getLangcode();
  
          if (isset($segments[0]) && $segments[0] === $langcode) {
              unset($segments[0]);
          }
  
          array_unshift($segments, $code);
  
          $url = $this->request->base(true) . trim(implode('/', $segments), '/');
          $url = empty($options) ? $url : "$url?" . http_build_query($options);
  
          return filter_var($url, FILTER_SANITIZE_URL);
      }
code_tokens: public function language ( $ code , $ path = '' , $ options = array ( ) ) { $ segments = $ this -> getSegments ( true , $ path ) ; $ langcode = $ this -> request -> getLangcode ( ) ; if ( isset ( $ segments [ 0 ] ) && $ segments [ 0 ] === $ langcode ) { unset ( $ segments [ 0 ] ) ; } array_unshift ( $ segments , $ code ) ; $ url = $ this -> request -> base ( true ) . trim ( implode ( '/' , $ segments ) , '/' ) ; $ url = empty ( $ options ) ? $ url : "$url?" . http_build_query ( $ options ) ; return filter_var ( $ url , FILTER_SANITIZE_URL ) ; }
docstring: Returns a URL with appended language code
  @param string $code
  @param string $path
  @param array $options
  @return string|false
docstring_tokens: Returns a URL with appended language code