PHPackages                             dasred/php-phraseapp-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dasred/php-phraseapp-client

AbandonedArchivedLibrary[API Development](/categories/api)

dasred/php-phraseapp-client
===========================

v2.1.1(10y ago)020PHPPHP &gt;=5.5

Since Aug 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/DasRed/php-phraseapp-client)[ Packagist](https://packagist.org/packages/dasred/php-phraseapp-client)[ Docs](https://github.com/DasRed/php-phraseapp-client)[ RSS](/packages/dasred-php-phraseapp-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

php-phraseapp-client
====================

[](#php-phraseapp-client)

PHP PhraseApp Client for [PhraseApp](https://phraseapp.com) and [API Version 2](http://docs.phraseapp.com/api/v2/).

CLI Usage
=========

[](#cli-usage)

tr-sync
-------

[](#tr-sync)

### Usage

[](#usage)

bin/tr-sync \[options\] sourcePath

### Arguments

[](#arguments)

sourcePath Path to search in.

### Options

[](#options)

```
--projectId (-p)                                  project id
--accessToken (-a)                                user access token
--localeDefault (-l)                              default locale. Default de-DE
--applicationName (-n) [  ]                       name of your application. Default PHP PhraseApp Client
--preferDirection (-d) [  ]                       prefer direction for sync (remote, local). Default: remote
--exclude (-x) [  ]                               regex to exclude files. can be given multiple times: Default: []
--tagForContentChangeFromLocalToRemote (-t) [  ]  tag for content change from local to remote. Default: newContent
--help (-h)                                               Display this help message
--quiet (-q)                                              Do not output any message
--version (-V)                                            Display this application version

```

phraseapp
---------

[](#phraseapp)

### Usage

[](#usage-1)

bin/phraseapp \[options\] operation

### Locale Operations

[](#locale-operations)

```
 locale create  [localeSource]   creates the given locale.
 locale list                             list all locales

```

### Key Operations

[](#key-operations)

```
 key addTag                              add the tag to the key.
 key create  [description] [tag ...]         create a new key.
 key delete                                   deletes the key.
 key list                                          list the key.
 key update   [description] [tag ...]   updates the key.

```

### Translation Operations

[](#translation-operations)

```
 translation store      set content of a key for a locale.

```

### Options

[](#options-1)

```
 --projectId (-p)             project id
 --accessToken (-a)           user access token
 --localeDefault (-l)         default locale. Default de-DE
 --applicationName (-n) [  ]  name of your application. Default PHP PhraseApp Client
 --help (-h)                          Display this help message
 --version (-V)                       Display this application version

```

PHP Usage for Synchronize
=========================

[](#php-usage-for-synchronize)

```
use DasRed\Zend\Log\Writer\Console as Writer;
use DasRed\Zend\Log\Logger\Console as Logger;
use Zend\Console\Console;
use DasRed\PhraseApp\Synchronize\Files\Type\Php;
use DasRed\PhraseApp\Synchronize\Files;
use DasRed\PhraseApp\Config;

// create logger
$writer = new Writer(Console::getInstance(), Writer::DEBUG);
$logger = new Logger();
$logger->addWriter($writer);

// create the config for synchronizer and co
$projectId = 'This is the project id.';
$accessToken = 'This is the authentication token for your user.';
$localeDefault = 'This is your default or main locale.';
$config = new Config($projectId, $accessToken, $localeDefault);

// This is the user agent which will reported to PhraseApp http://docs.phraseapp.com/api/v2/#identification-via-user-agent
$config->setApplicationName('Fancy Application Name (nuff@example.com)');

// set the direction, which is prefered. If all from PhraseApp is always correct, then REMOTE ist prefered. Otherwise LOCAL
$config->setPreferDirection(Config::PREFER_REMOTE);

// set a default translation key tag which will be setted on translations keys, which will be written to phraseapp
$config->setTagForContentChangeFromLocalToRemote('newContent');

// create the synchronizer for many files
$synchronizer = new Files($logger, $config);

// create and append the handler for file loading and writing
$path = 'This is the path to translation in which the sub pathes defines the locales.';
$excludeNames = ['This is an array of regex to exclude if it match with by file name and file path'];
$handler = new Php($path, $excludeNames);
$synchronizer->appendHandler($handler);

// synchronize everything
if ($synchronizer->synchronize() === false)
{
	throw new \Exception();
}
```

PHP Usage for Inline Translation of PhraseApp
=============================================

[](#php-usage-for-inline-translation-of-phraseapp)

Instead of using the original translator from [\\DasRed\\Translation\\Translator](https://github.com/DasRed/translation/blob/master/src/Translator.php) use the [Translator (\\DasRed\\PhraseApp\\Translator\\PhraseApp)](https://github.com/DasRed/php-phraseapp-client/blob/master/src/Translator/PhraseApp.php) in this client:

```
// instead of
$translator = new \DasRed\Translation\Translator('de-DE', __DIR__);

// use
$translator = new \DasRed\PhraseApp\Translator\PhraseApp('de-DE', __DIR__);
```

and then do the rest of the [explanation from PhraseApp](http://docs.phraseapp.com/guides/in-context-editor/). The inline key prefix will be "{{\_\_phrase\_" and the suffix will be "\_\_}}".

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

6

Last Release

3852d ago

Major Versions

v1.0.2 → v2.0.02015-08-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef78ddaf0926a841c1d5e0be4c642ecfc324bab22ecaa2e0750ac9136db5eec0?d=identicon)[DasRed](/maintainers/DasRed)

---

Top Contributors

[![DasRed](https://avatars.githubusercontent.com/u/2239808?v=4)](https://github.com/DasRed "DasRed (18 commits)")

### Embed Badge

![Health badge](/badges/dasred-php-phraseapp-client/health.svg)

```
[![Health](https://phpackages.com/badges/dasred-php-phraseapp-client/health.svg)](https://phpackages.com/packages/dasred-php-phraseapp-client)
```

###  Alternatives

[jacobsteringa/odoo-client

A PHP Client for Odoo

1324.1k](/packages/jacobsteringa-odoo-client)[zfr/zfr-prerender

Integration with prerender.io service

218.0k](/packages/zfr-zfr-prerender)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
