PHPackages                             romaten1/php-lokalise-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. romaten1/php-lokalise-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

romaten1/php-lokalise-api
=========================

Lokalise API client

3.2(5y ago)012MITPHPPHP ~7.2 || ~8.0

Since Oct 2Pushed 5y agoCompare

[ Source](https://github.com/romaten1/php-lokalise-api)[ Packagist](https://packagist.org/packages/romaten1/php-lokalise-api)[ Docs](https://app.lokalise.com/api2docs/curl/)[ RSS](/packages/romaten1-php-lokalise-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (18)Used By (0)

Lokalise API v2 official PHP library
====================================

[](#lokalise-api-v2-official-php-library)

Client library for [Lokalise](https://lokalise.com) API 2.0, written with PHP5. [Full API reference](https://lokalise.com/api2docs/curl/).

Changelog is located [here](CHANGELOG.md).

Getting started
---------------

[](#getting-started)

1. PHP 7.2.x or greater is required
2. Install LokaliseApiClient using [Composer](#composer-installation) (recommended) or manually

Composer installation
---------------------

[](#composer-installation)

1. Get [Composer](http://getcomposer.org/)
2. Require LokaliseApiClient with `php composer.phar require lokalise/php-lokalise-api`
3. Add the following to your application's main PHP file: `require 'vendor/autoload.php';`

Construct LokaliseApiClient
---------------------------

[](#construct-lokaliseapiclient)

Create and grab your API token at [Lokalise profile](https://lokalise.com/profile)

```
$client = new \Lokalise\LokaliseApiClient($apiToken);
```

Request
-------

[](#request)

[Comments](Docs/comments.md)

[Contributors](Docs/contributors.md)

[Files](Docs/files.md)

[Keys](Docs/keys.md)

[Languages](Docs/languages.md)

[Payment Cards](Docs/paymentCards.md)

[Projects](Docs/projects.md)

[Queued Processes](Docs/queuedProcesses.md)

[Screenshots](Docs/screenshots.md)

[Snapshots](Docs/snapshots.md)

[Tasks](Docs/tasks.md)

[Teams](Docs/teams.md)

[Team Users](Docs/teamUsers.md)

[Team User Groups](Docs/teamUserGroups.md)

[Translations](Docs/translations.md)

[Translation Providers](Docs/translationProviders.md)

[Orders](Docs/orders.md)

[Webhooks](Docs/webhooks.md)

Response
--------

[](#response)

```
/** @var \Lokalise\LokaliseApiResponse $response */
$response = $client->languages->listSystem();

$response->
    headers                // Associative array of Lokalise headers received
    getContent()           // Return response data as associative array
    __toArray()            // getContent() alias. Return response data as associative array
    __toString()           // Return JSON encoded response data
    getTotalCount()        // Return total count of filtered items in List methods
    getPageCount()         // Return count of pages in List methods (based on limit parameter)
    getPaginationLimit()   // Return pagination limit used in the request
    getPaginationPage()    // Return current page of the request
```

Utils
-----

[](#utils)

```
\Lokalise\Utils::
    base64FileEncode($filePath)    // Get base64 encoded contents with leading mime type
```

Exceptions and errors
---------------------

[](#exceptions-and-errors)

```
\Lokalise\Exceptions\LokaliseApiException       // Exception throws when Lokalise API can't be reached using Guzzle
\Lokalise\Exceptions\LokaliseResponseException  // Exception throws when Lokalise API responded with a single error
```

Best practice

```
$client = new \Lokalise\LokaliseApiClient($apiToken);

try {
    $language = $client->languages->retrieve($projectId, $languageId)->getContent();
} catch (\Lokalise\Exceptions\LokaliseApiException $e) {
    // try again later or break
} catch (\Lokalise\Exceptions\LokaliseResponseException $e) {
    // Request cannot be completed. More details in {$e->getCode()} and {$e->getMessage()}
    // break
}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~81 days

Recently: every ~168 days

Total

11

Last Release

2015d ago

Major Versions

2.2.0 → 3.0.02020-05-25

PHP version history (4 changes)2.0.0PHP ^5.3 || ^7.0

2.0.2PHP ^5.6 || ^7.0

2.0.5PHP ^5.6 || ~7.0

3.2PHP ~7.2 || ~8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7621399?v=4)[Roman](/maintainers/romaten1)[@romaten1](https://github.com/romaten1)

---

Top Contributors

[![andrewi-wd](https://avatars.githubusercontent.com/u/2337032?v=4)](https://github.com/andrewi-wd "andrewi-wd (41 commits)")[![beinarovic](https://avatars.githubusercontent.com/u/1528278?v=4)](https://github.com/beinarovic "beinarovic (27 commits)")[![nickustinov](https://avatars.githubusercontent.com/u/823000?v=4)](https://github.com/nickustinov "nickustinov (25 commits)")[![yarlson](https://avatars.githubusercontent.com/u/751584?v=4)](https://github.com/yarlson "yarlson (4 commits)")[![TheLevti](https://avatars.githubusercontent.com/u/7612582?v=4)](https://github.com/TheLevti "TheLevti (1 commits)")[![masuichig](https://avatars.githubusercontent.com/u/24214655?v=4)](https://github.com/masuichig "masuichig (1 commits)")[![ansisblodnieks](https://avatars.githubusercontent.com/u/12951277?v=4)](https://github.com/ansisblodnieks "ansisblodnieks (1 commits)")[![akankov](https://avatars.githubusercontent.com/u/1974569?v=4)](https://github.com/akankov "akankov (1 commits)")[![romaten1](https://avatars.githubusercontent.com/u/7621399?v=4)](https://github.com/romaten1 "romaten1 (1 commits)")

---

Tags

apirestlokalise

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/romaten1-php-lokalise-api/health.svg)

```
[![Health](https://phpackages.com/badges/romaten1-php-lokalise-api/health.svg)](https://phpackages.com/packages/romaten1-php-lokalise-api)
```

###  Alternatives

[lokalise/php-lokalise-api

Lokalise API client

192.4M2](/packages/lokalise-php-lokalise-api)[mediamonks/rest-api-bundle

MediaMonks Rest API Symfony Bundle

1656.2k1](/packages/mediamonks-rest-api-bundle)

PHPackages © 2026

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