original_string: public function create(string $projectKey, string $localeId, string $keyId, string $content, array $params = [])
      {
          $params['locale_id'] = $localeId;
          $params['key_id'] = $keyId;
          $params['content'] = $content;
  
          $response = $this->httpPost(sprintf('/api/v2/projects/%s/translations', $projectKey), $params);
  
          if (!$this->hydrator) {
              return $response;
          }
  
          if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 201) {
              $this->handleErrors($response);
          }
  
          return $this->hydrator->hydrate($response, TranslationCreated::class);
      }
code: public function create(string $projectKey, string $localeId, string $keyId, string $content, array $params = [])
      {
          $params['locale_id'] = $localeId;
          $params['key_id'] = $keyId;
          $params['content'] = $content;
  
          $response = $this->httpPost(sprintf('/api/v2/projects/%s/translations', $projectKey), $params);
  
          if (!$this->hydrator) {
              return $response;
          }
  
          if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 201) {
              $this->handleErrors($response);
          }
  
          return $this->hydrator->hydrate($response, TranslationCreated::class);
      }
code_tokens: public function create ( string $ projectKey , string $ localeId , string $ keyId , string $ content , array $ params = [ ] ) { $ params [ 'locale_id' ] = $ localeId ; $ params [ 'key_id' ] = $ keyId ; $ params [ 'content' ] = $ content ; $ response = $ this -> httpPost ( sprintf ( '/api/v2/projects/%s/translations' , $ projectKey ) , $ params ) ; if ( ! $ this -> hydrator ) { return $ response ; } if ( $ response -> getStatusCode ( ) !== 200 && $ response -> getStatusCode ( ) !== 201 ) { $ this -> handleErrors ( $ response ) ; } return $ this -> hydrator -> hydrate ( $ response , TranslationCreated :: class ) ; }
docstring: Create a translation.
  
  @param string $projectKey
  @param string $keyId
  @param string $content
  @param array  $params
  
  @return TranslationCreated|ResponseInterface
docstring_tokens: Create a translation .