PHP code example of crowdin / crowdin-api-client

1. Go to this page and download the library: Download crowdin/crowdin-api-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

crowdin / crowdin-api-client example snippets


use CrowdinApiClient\Crowdin;

$crowdin = new Crowdin([
    'access_token' => '<access_token>',
    'organization' => '<organization_domain>', // optional
]);

    $directory = $crowdin->directory->create(
        <project_id>,
        ['name'=> 'My Directory']
    );
    

    $directory->setTitle('My Title');

    $crowdin->directory->update($directory);
    

    $crowdin->directory->delete($directory->getProjectId(), $directory->getId());