src/Api/Translation.php
public function update(string $projectKey, string $translationId, string $content, array $params = [])
    {
        $params['content'] = $content;

        $response = $this->httpPatch(sprintf('/api/v2/projects/%s/translations/%s', $projectKey, $translationId), $params);

        if (!$this->hydrator) {
            return $response;
        }

        if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 201) {
            $this->handleErrors($response);
        }

        return $this->hydrator->hydrate($response, TranslationUpdated::class);
    }
public function update(string $projectKey, string $translationId, string $content, array $params = [])
    {
        $params['content'] = $content;

        $response = $this->httpPatch(sprintf('/api/v2/projects/%s/translations/%s', $projectKey, $translationId), $params);

        if (!$this->hydrator) {
            return $response;
        }

        if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 201) {
            $this->handleErrors($response);
        }

        return $this->hydrator->hydrate($response, TranslationUpdated::class);
    }
public function update ( string $ projectKey , string $ translationId , string $ content , array $ params = [ ] ) { $ params [ 'content' ] = $ content ; $ response = $ this -> httpPatch ( sprintf ( '/api/v2/projects/%s/translations/%s' , $ projectKey , $ translationId ) , $ params ) ; if ( ! $ this -> hydrator ) { return $ response ; } if ( $ response -> getStatusCode ( ) !== 200 && $ response -> getStatusCode ( ) !== 201 ) { $ this -> handleErrors ( $ response ) ; } return $ this -> hydrator -> hydrate ( $ response , TranslationUpdated :: class ) ; }
Update a translation.

@param string $projectKey
@param string $translationId
@param string $content
@param array  $params

@return TranslationUpdated|ResponseInterface
Update a translation .