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)19626.8k↓21.5%73MITPHPPHP ^7.1.3|^8.0CI failing

Since Jan 20Pushed 1y 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 1mo 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

51

—

FairBetter than 96% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity47

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

565d 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://www.gravatar.com/avatar/7949205dc127b0404297d8fa601585faa9d1f4eeee9b3f57b0be65c1a70f2bcc?d=identicon)[timwhitlock](/maintainers/timwhitlock)

![](https://www.gravatar.com/avatar/5479253acd5bc25720cc5d5a0c582744300f92fa2ba927fdd5c5a3b44c5b246e?d=identicon)[loco](/maintainers/loco)

---

Top Contributors

[![timwhitlock](https://avatars.githubusercontent.com/u/160589?v=4)](https://github.com/timwhitlock "timwhitlock (3 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)")[![WengerK](https://avatars.githubusercontent.com/u/1841592?v=4)](https://github.com/WengerK "WengerK (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

[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[inpsyde/multilingual-press

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

2414.0k1](/packages/inpsyde-multilingual-press)[fisharebest/localization

A lightweight localization database and translation tools, with data from the CLDR, IANA, ISO, etc.

3191.1k2](/packages/fisharebest-localization)[delight-im/i18n

Internationalization and localization for PHP

625.2k3](/packages/delight-im-i18n)[mediawiki/translate

The only standard solution to translate any kind of text with an avant-garde web interface within MediaWiki, including your documentation and software

457.9k](/packages/mediawiki-translate)[jrmajor/fluent

Fluent localization system for PHP

2716.9k5](/packages/jrmajor-fluent)

PHPackages © 2026

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