PHPackages                             loco/loco - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. loco/loco

ActiveLibrary[Localization &amp; i18n](/categories/localization)

loco/loco
=========

Loco SDK for PHP, including REST API client

2.0.14(1y ago)20671.4k↓44.7%73MITPHPPHP ^7.1.3|^8.0CI failing

Since Jan 20Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/loco/loco-php-sdk)[ Packagist](https://packagist.org/packages/loco/loco)[ Docs](https://github.com/loco/loco-php-sdk)[ RSS](/packages/loco-loco/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (6)Versions (36)Used By (3)

Loco SDK for PHP
================

[](#loco-sdk-for-php)

Installation
------------

[](#installation)

Installation is via [Composer](http://getcomposer.org/doc/00-intro.md#using-composer).

Add the latest stable version of [loco/loco](https://packagist.org/packages/loco/loco) to your project's `composer.json` file as follows:

```
"require": {
  "loco/loco": "^2.0"
}
```

REST API Client
---------------

[](#rest-api-client)

The SDK includes a REST client for the [Loco API](https://localise.biz/api).

### Client usage

[](#client-usage)

The client is built on [Guzzle](http://guzzle.readthedocs.org). Basic usage is to construct with your API key and call the [endpoint methods](https://localise.biz/api/docs) directly. The following example simply verifies your credentials:

```
$client = Loco\Http\ApiClient::factory(['key' => 'your_api_key']);
$result = $client->authVerify();
printf("Authenticated as '%s'\n", $result['user']['name']);
```

See the [example directory](https://github.com/loco/loco-php-sdk/tree/master/example) for more.

### Advanced options

[](#advanced-options)

Additionally the `ApiClient::factory` method can take any arguments accepted by Guzzle's client constructor. See [Request Options](https://guzzle.readthedocs.io/en/stable/request-options.html) and [Handlers and Middleware](http://docs.guzzlephp.org/en/stable/handlers-and-middleware.html) for full details.

Command Line Client
-------------------

[](#command-line-client)

A [Console](http://symfony.com/doc/current/components/console/introduction.html) interface supporting all methods of the Loco API is at `bin/console`. Just run it to see all the available options.

The console reads from [config.json](https://github.com/loco/loco-php-sdk/blob/master/config.json.dist), but you can override your API key from the command line. Run the following to verify your credentials:

```
bin/console loco:auth:verify -v -k
```

Documentation
-------------

[](#documentation)

- Check the [Loco API documentation](https://localise.biz/api) for full details on each endpoint.
- See the [example directory](https://github.com/loco/loco-php-sdk/tree/master/example) for more working code examples.

Breaking changes in v2.0
------------------------

[](#breaking-changes-in-v20)

Updating from Guzzle 3 to Guzzle 6 brought some necessary breaking changes with it. If you're upgrading from [1.0.18](https://github.com/loco/loco-php-sdk/tree/1.0.18), please note the following:

- The structure of `config.json` has changed. Note in particular a single root object containing your values as per the [example config](https://github.com/loco/loco-php-sdk/blob/master/config.json.dist).
- The version number of the SDK is no longer synced to the version of the API. Each release will however be built against the [latest version](https://localise.biz/api/docs/changelog) of the live service.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance66

Regular maintenance activity

Popularity48

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 50% 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 ~119 days

Recently: every ~279 days

Total

34

Last Release

611d ago

Major Versions

1.0.18 → 2.0.02018-03-27

PHP version history (4 changes)1.0.0-alphaPHP &gt;=5.3.3

2.0.0PHP &gt;=5.5

2.0.8PHP ^7.1.3

2.0.10PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/160589?v=4)[Tim Whitlock](/maintainers/timwhitlock)[@timwhitlock](https://github.com/timwhitlock)

![](https://avatars.githubusercontent.com/u/6068759?v=4)[Loco](/maintainers/loco)[@loco](https://github.com/loco)

---

Top Contributors

[![timwhitlock](https://avatars.githubusercontent.com/u/160589?v=4)](https://github.com/timwhitlock "timwhitlock (4 commits)")[![WengerK](https://avatars.githubusercontent.com/u/1841592?v=4)](https://github.com/WengerK "WengerK (2 commits)")[![bancer](https://avatars.githubusercontent.com/u/3830106?v=4)](https://github.com/bancer "bancer (1 commits)")[![digitv](https://avatars.githubusercontent.com/u/11768817?v=4)](https://github.com/digitv "digitv (1 commits)")

---

Tags

localisationlocalizationphptranslationtranslation-managementi18nl10nlanguagestranslationloco

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

44311.1M75](/packages/jms-translation-bundle)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[gettext/languages

gettext languages with plural rules

7832.7M12](/packages/gettext-languages)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)

PHPackages © 2026

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