PHPackages                             amplexor/xconnect - 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. amplexor/xconnect

ActiveLibrary[API Development](/categories/api)

amplexor/xconnect
=================

A PHP client for the AMPLEXOR Translation Services (see http://www.amplexor.com/globalcontent/en/language-services/translation-services.html).

0.2.1(10y ago)12291[2 PRs](https://github.com/amplexor-drupal/xconnect/pulls)MITPHPPHP &gt;=5.4.0CI failing

Since Oct 28Pushed 4y ago3 watchersCompare

[ Source](https://github.com/amplexor-drupal/xconnect)[ Packagist](https://packagist.org/packages/amplexor/xconnect)[ Docs](https://github.com/amplexor-drupal/xconnect)[ RSS](/packages/amplexor-xconnect/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (8)Used By (0)

AMPLEXOR X-Connect
==================

[](#amplexor-x-connect)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9875230e8b51138f0df0cd737b51129eb5c5d89e3ffa6520db642f89228abac9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d706c65786f722f78636f6e6e6563742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/amplexor/xconnect)[![Build Status](https://camo.githubusercontent.com/aba6590066238ae433944b04dc0179c520191a14a3d42625d98c3a2d41d3f500/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f616d706c65786f722d64727570616c2f78636f6e6e6563742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/amplexor-drupal/xconnect/branches)[![Coverage status](https://camo.githubusercontent.com/fa314f4e62a88027479b1adbc607e1c28e1dc926107e74aad86d32f326c03cda/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f616d706c65786f722d64727570616c2f78636f6e6e6563742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/amplexor-drupal/xconnect)[![Quality Score](https://camo.githubusercontent.com/a23ed0fed70634da7aac4b7f41e3b6105cf27da25cde4b8f78c8a2def6afdc33/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f616d706c65786f722d64727570616c2f78636f6e6e6563742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/amplexor-drupal/xconnect/code-structure)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

[![SensioLabsInsight](https://camo.githubusercontent.com/1fa75c8aee53ecd93ee3e716a1d285ef14932777f703233de620da274a8357db/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f30613261386534352d653835632d346333302d626561302d3165303563636463353632332f6269672e706e67)](https://insight.sensiolabs.com/projects/0a2a8e45-e85c-4c30-bea0-1e05ccdc5623)

This library implements a PHP client for the [AMPLEXOR Translation Services](http://goo.gl/xCQ4em).

Install
-------

[](#install)

Via Composer:

```
$ composer require amplexor/xconnect
```

Usage
-----

[](#usage)

[AMPLEXOR Translation Services](http://goo.gl/xCQ4em) provides (S)FTP environments to upload translation requests to and download translation responses. The files are packed in ZIP archives. These archives always contain a file with details about the request (order.xml) and the response (name-of-the-response-file.xml).

The *amplexor/xconnect* library abstracts this file creation and transfer process.

### Create and send a translation request

[](#create-and-send-a-translation-request)

Create a new translation request and send it to the AMPLEXOR Translation Service.

```
use Amplexor\XConnect\Request;
use Amplexor\XConnect\Request\File\ZipFile;
use Amplexor\XConnect\Service\SFtpService;

// Create a new translation request.
$sourceLanguage = 'en';
$config = [
    'clientId'          => 'abcde-1234567890-edcba',
    'orderNamePrefix'   => 'my_translation_order',
    'dueDate'           => 0,
    'issuedBy'          => 'me@company.com',
    'isConfidential'    => false,
    'needsConfirmation' => true,
    'needsQuotation'    => false,
];
$request = new Request($sourceLanguage, $config);

// Fill in the request details:
// The Language(s) to translate the content to:
$request->addTargetLanguage('nl');
$request->addTargetLanguage('fr');
// Optional instructions and reference:
$request->addInstruction('Instruction to add.');
$request->setReference('MY-INTERNAL-REF-0123456789');

// Add content to translate from files.
$request->addFile('path/to/file/document.docx');
$request->addFile('path/to/file/document.xml');

// Add content to translate from strings, a filename needs to be passed to
// identify the different content items.
$request->addFileContent('filename.html', $content);
$request->addFileContent('filename.xliff', $content);

// Create a service object by passing the connection details.
// There are 2 Service available depending on the AMPLEXOR Translation Service configuration:
// - FtpService : Transport over FTP (no encryption).
// - SFtpService : Transport over SSH (encryption).
$config = [
    'hostname' => 'hostname.com',
    'port'     => 22,
    'timeout'  => 90,
    'username' => 'USERNAME',
    'password' => 'PASSWORD',
    'directory_send' => 'TO_LSP',
    'directory_send_processed' => 'TO_LSP_processed',
    'directory_receive' => 'FROM_LSP',
    'directory_receive_processed' => 'FROM_LSP_processed',
];
$service = new SFtpService($config);

// Send the request as a zip file.
$result = $service->send(ZipFile::create($request, 'directory/to/store/file'));
```

### Scan AMPLEXOR Translation Service for processed translations

[](#scan-amplexor-translation-service-for-processed-translations)

Connect to the AMPLEXOR Translation Service and retrieve a list of translated files.

```
use Amplexor\XConnect\Service\SFtpService;

// Connect to the AMPLEXOR Translation Service.
$service = new SFtpService($config);

// Get the list of ZIP packages that are ready, this will be an array of
// filenames. Retrieving these files is possible by using the services receive
// method.
$list = $service->scan();
```

### Receive processed translations

[](#receive-processed-translations)

Connect to the AMPLEXOR Translation Service, download the processed translation and extract the content.

```
use Amplexor\XConnect\Response;
use Amplexor\XConnect\Response\File\ZipFile;
use Amplexor\XConnect\Service\SFtpService;

// Connect to the AMPLEXOR Translation Service.
$service = new SFtpService($config);

// Retrieve a single translation file (ZIP package).
$filePath = $service->receive(
    // The filename ready to be picked up.
    'filename.zip',
    // The local directory where to store the downloaded file.
    '/local/directory/to/store/the/downloaded/file/'
);

// Create a response object as a wrapper around the received file.
$response = new Response(new ZipFile($filePath));

// Get the translations from the Response.
$translations = $response->getTranslations();

// Get the content of the translations.
foreach ($translations as $translation) {
  $content = $translation->getContent();
}

// Let the service know that the response Zip archive is processed.
$service->processed('filename.zip');
```

Testing
-------

[](#testing)

Run all tests (make sure that you first have downloaded the dependencies with composer, see Contributing):

```
$ cd /path/where/the/repo/is/cloned
$ phpunit
```

Contributing
------------

[](#contributing)

Fork this repository and create pull requests if you would like to contribute.

Setup your local development environment by cloning the forked repository and run composer to get the dependencies:

```
$ cd /path/where/the/repo/is/cloned
$ composer install
```

Credits
-------

[](#credits)

- [zero2one](https://github.com/zero2one)
- [MPParsley](https://github.com/MPParsley)
- [All Contributors](https://github.com/amplexor-drupal/xconnect/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.3% 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 ~62 days

Total

4

Last Release

3667d ago

### Community

Maintainers

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

---

Top Contributors

[![sgrame](https://avatars.githubusercontent.com/u/1064446?v=4)](https://github.com/sgrame "sgrame (63 commits)")[![MPParsley](https://avatars.githubusercontent.com/u/1823998?v=4)](https://github.com/MPParsley "MPParsley (47 commits)")[![zero2one](https://avatars.githubusercontent.com/u/133124?v=4)](https://github.com/zero2one "zero2one (2 commits)")

---

Tags

apiclientlanguageservicewrappergcm

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/amplexor-xconnect/health.svg)

```
[![Health](https://phpackages.com/badges/amplexor-xconnect/health.svg)](https://phpackages.com/packages/amplexor-xconnect)
```

###  Alternatives

[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[swader/diffbot-php-client

A PHP wrapper for using Diffbot's API

5328.5k](/packages/swader-diffbot-php-client)[google-gemini-php/symfony

Symfony Bundle for Gemini

149.4k1](/packages/google-gemini-php-symfony)[qwen-php/qwen-php-client

robust and community-driven PHP SDK library for seamless integration with the qwen AI API, offering efficient access to advanced AI and data processing capabilities

213.2k1](/packages/qwen-php-qwen-php-client)

PHPackages © 2026

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