transifex API client written 100% in PHP

1.0.1 2018-09-29 15:10 UTC

This package is auto-updated.

Last update: 2021-10-10 03:15:24 UTC


Build Status Latest Version tagged Latest Version on Packagist Installations via composer per month

Transifex client written in PHP.

This uses php-http base interfaces.


$ php composer.phar require cyberspectrum/php-transifex php-http/guzzle6-adapter

Why php-http/guzzle6-adapter? We are decoupled form any HTTP messaging client with help by HTTPlug.

You may also install any other adapter instead of php-http/guzzle6-adapter, just make sure one is installed.


We have two layers of API.

  1. Low level API in the namespace CyberSpectrum\PhpTransifex\Api
  2. High level entity based API in the namespace CyberSpectrum\PhpTransifex\Model

1. Low level API.

Quick start - create an API client:

$client = new CyberSpectrum\PhpTransifex\Client();
// Or:
// $client->authenticate($user, $password);

// Fetch a project:
$project = $client->projects()->show('some-project');

For details of the endpoints, refer to the doc comments in the classes.

2. High level API.

Create an API client:

$transifex = PhpTransifex::create($apiKey);
// Or:
// $transifex = PhpTransifex::create($user, $password);

Create a project:

$project = $transifex->createProject(
    'My Project description',
    'en', // source language code.
    '' // the repository URL for open source projects or false for private.

Fetch a project:

$project = $transifex->project('some-project');

Add a language


// Show all language codes for the project.