original_string: public function setLocale($locale, array $alternates = array())
      {
          $this->insertMeta('set', 'locale', $locale);
  
          if (!empty($alternates)) {
              foreach ($alternates as $alternate) {
                  $this->insertStructure('append', 'locale', array(
                      'alternate' => $alternate
                  ));
              }
          }
  
          return $this;
      }
code: public function setLocale($locale, array $alternates = array())
      {
          $this->insertMeta('set', 'locale', $locale);
  
          if (!empty($alternates)) {
              foreach ($alternates as $alternate) {
                  $this->insertStructure('append', 'locale', array(
                      'alternate' => $alternate
                  ));
              }
          }
  
          return $this;
      }
code_tokens: public function setLocale ( $ locale , array $ alternates = array ( ) ) { $ this -> insertMeta ( 'set' , 'locale' , $ locale ) ; if ( ! empty ( $ alternates ) ) { foreach ( $ alternates as $ alternate ) { $ this -> insertStructure ( 'append' , 'locale' , array ( 'alternate' => $ alternate ) ) ; } } return $ this ; }
docstring: Set 'locale' property.
  
  @param string $locale Default locale
  @param array $alternates Alternate locales array
  @return self
docstring_tokens: Set locale property .