PHPackages                             pixelpub/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. pixelpub/loco

ActiveLibrary

pixelpub/loco
=============

Laravel package for the localise.biz api

01.6kPHP

Since Jul 18Pushed 9y ago3 watchersCompare

[ Source](https://github.com/PixelPub/laravel-loco)[ Packagist](https://packagist.org/packages/pixelpub/loco)[ RSS](/packages/pixelpub-loco/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel package for the localise.biz api
========================================

[](#laravel-package-for-the-localisebiz-api)

This package delivers an easy to use interface for fetching and caching assets from the Localise.biz api.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
    - [Composer](#composer)
    - [Manually](#manually)
    - [Laravel](#laravel)
- [Configuration](#configuration)
    - [Configuration file](#configuration-file)
    - [Configuration values](#configuration-values)
- [Usage](#usage)
    - [Fetch translation](#fetch-translation)
    - [Flush Cache](#flush-cache)
- [Changelog](#changelog)
- [License](#license)

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

[](#installation)

### Composer

[](#composer)

Add PixelPub/Loco to your `composer.json` file.

```
"pixelpub/loco":"dev-master"

```

Run `composer install` to get the latest version of the package.

### Manually

[](#manually)

It's recommended that you use Composer, however you can download and install from this repository.

### Laravel

[](#laravel)

Laravel-Loco comes with a service provider for Laravel.

To register the service provider in your Laravel application, open `config/app.php` and add the following line to the `providers` array:

```
	...
	Pixelpub\Loco\LocoServiceProvider::class
	...
```

Configuration
-------------

[](#configuration)

### Configuration file

[](#configuration-file)

In order to edit the default package configuration, you can run the following artisan command:

```
php artisan vendor:publish --provider="Pixelpub\Loco\LocoServiceProvider" --tag="config"

```

Once you have done that, you will find the config file at `config/loco.php`.

### Configuration values

[](#configuration-values)

- `api` (default: `https://localise.biz/api/export/locale/`)

Localise.biz api url.

- `languages` (default: `['en_US', 'de_DE']`)

An array of the locales available on the Localise.biz api.

- `projects`

An array of key-value pairs, defining the Localise.biz projects including their api key.

- `cache` (default: `database`)

Defining the laravel cache interface, which will contain the assets, fetched from Localise.biz.

Usage
-----

[](#usage)

### Fetch translation

[](#fetch-translation)

The `LocoServiceProvider.php` is injected via the Loco interface.

```
	...
	use Pixelpub\Loco\LocoContract;
	...
    public function translation(Loco $loco)
    {
        return $loco->fetch('my-translation-project', 'en_US');
    }
	...
```

Once you have done this, there is nothing more that you MUST do. Laravel application locale has been set and you can use other locale-dependant Laravel components (e.g. Translation) as you normally do.

### Flush cache

[](#flush-cache)

All assets will be fetched one time from the loco api and stored permanently in the cache. If you call the flush method, this package will try to load the assets from loco before actually flushing the cache. If loco api is not available, the current assets will be remain in the cache and an exception is thrown.

```
    $loco->flush('my-translation-project');
```

### License

[](#license)

This package is licensed under the [MIT license](https://github.com/PixelPub/laravel-loco/blob/master/LICENSE).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![probststefan](https://avatars.githubusercontent.com/u/182016?v=4)](https://github.com/probststefan "probststefan (3 commits)")

### Embed Badge

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

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

PHPackages © 2026

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