<commit_before># Amplexor X-Connect

[![Latest Version](https://img.shields.io/github/release/amplexor-drupal/xconnect.svg?style=flat-square)](https://github.com/amplexor-drupal/xconnect/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/amplexor-drupal/xconnect/master.svg?style=flat-square)](https://travis-ci.org/amplexor-drupal/xconnect)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/amplexor-drupal/xconnect.svg?style=flat-square)](https://scrutinizer-ci.com/g/amplexor-drupal/xconnect/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/amplexor-drupal/xconnect.svg?style=flat-square)](https://scrutinizer-ci.com/g/amplexor-drupal/xconnect)
[//]: <> [![Total Downloads](https://img.shields.io/packagist/dt/amplexor/xconnect.svg?style=flat-square)](https://packagist.org/packages/amplexor/xconnect)

This library implements a PHP client for the Euroscript Global Content 
Management (GCM) language services (see http://goo.gl/VW0KK6).


## Install

Via Composer

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


## Usage

### Create and send a request
Create a new translation request and send it to the GCM service.

``` php
// Create a translation request order.
$config = array();
$order = new Amplexor\XConnect\Request\Order('en', $config);
$orderFile = new Amplexor\XConnect\Request\File\Zip('/local/temp/path/', $order);

// Add file(s) that need to be translated.
$orderFile->addFile('/path/to/local/file.ext');
// ...

// Add files as strings that need to be translated.
$orderFile->addFileString('filename.html', $string);<commit_msg>removed the downloads counter for now.<commit_after># Amplexor X-Connect

[![Latest Version](https://img.shields.io/github/release/amplexor-drupal/xconnect.svg?style=flat-square)](https://github.com/amplexor-drupal/xconnect/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/amplexor-drupal/xconnect/master.svg?style=flat-square)](https://travis-ci.org/amplexor-drupal/xconnect)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/amplexor-drupal/xconnect.svg?style=flat-square)](https://scrutinizer-ci.com/g/amplexor-drupal/xconnect/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/amplexor-drupal/xconnect.svg?style=flat-square)](https://scrutinizer-ci.com/g/amplexor-drupal/xconnect)


This library implements a PHP client for the Euroscript Global Content 
Management (GCM) language services (see http://goo.gl/VW0KK6).


## Install

Via Composer

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


## Usage

### Create and send a request
Create a new translation request and send it to the GCM service.

``` php
// Create a translation request order.
$config = array();
$order = new Amplexor\XConnect\Request\Order('en', $config);
$orderFile = new Amplexor\XConnect\Request\File\Zip('/local/temp/path/', $order);

// Add file(s) that need to be translated.
$orderFile->addFile('/path/to/local/file.ext');
// ...

// Add files as strings that need to be translated.
$orderFile->addFileString('filename.html', $string);
{'fraction_non_alphanumeric': 0.16976531545260592, 'fraction_numerical': 0.0012191405059433099, 'mean_word_length': 5.287356321839081, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2666838', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1096, 'n_words': 186}