crowdin/crowdin-api-client

PHP client library for Crowdin API v2

1.7.2 2022-07-07 08:29 UTC

README

68747470733a2f2f737570706f72742e63726f7764696e2e636f6d2f6173736574732f6c6f676f732f63726f7764696e2d6461726b2d73796d626f6c2e706e67

Crowdin PHP client

The Crowdin PHP client is a lightweight interface to the Crowdin API v2. It provides common services for making API requests.

Our API is a full-featured RESTful API that helps you to integrate localization into your development process. The endpoints that we use allow you to easily make calls to retrieve information and to execute actions needed.

API Client Docs  |  Crowdin API  |  Crowdin Enterprise API

Packagist Version Packagist GitHub Release Date GitHub issues GitHub contributors GitHub

Azure DevOps builds (branch) Azure DevOps tests (branch) codecov

Table of Contents

Requirements

  • PHP >= 7.1

Installation

Install via Composer

composer require crowdin/crowdin-api-client

Quick Start

The API client must be instantiated and configured before calling any API method.

use CrowdinApiClient\Crowdin;

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

<access_token> - Personal Access Token. You can generate Personal Access Token in your Crowdin Account Settings.

<organization_domain> - Organization domain name (for Crowdin Enterprise users only).

For more about Authorization see the documentation.

Running methods

  • Create

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

    $directory->setTitle('My Title');
    
    $crowdin->directory->update($directory);
  • Delete

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

Seeking Assistance

If you find any problems or would like to suggest a feature, please read the How can I contribute section in our contributing guidelines.

Need help working with Crowdin PHP client or have any questions? Contact Customer Success Service.

Contributing

If you want to contribute please read the Contributing guidelines.

License

The Crowdin PHP client is licensed under the MIT License.
See the LICENSE file distributed with this work for additional
information regarding copyright ownership.

Except as contained in the LICENSE file, the name(s) of the above copyright
holders shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written authorization.