PHPackages                             cosavostra/localise-bundle - 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. cosavostra/localise-bundle

ActiveSymfony-bundle[Localization &amp; i18n](/categories/localization)

cosavostra/localise-bundle
==========================

Symfony localise.biz library

v1.2.4(5y ago)21.5kMITPHPPHP ^7.1.3CI failing

Since May 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mradhi/localise-bundle)[ Packagist](https://packagist.org/packages/cosavostra/localise-bundle)[ RSS](/packages/cosavostra-localise-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (14)Used By (0)

Localise Bundle for Symfony
===========================

[](#localise-bundle-for-symfony)

PHP Symfony wrapper for [Localise](https://localise.biz) service.

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer req cosavostra/localise-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer req cosavostra/localise-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    CosaVostra\LocaliseBundle\CosaVostraLocaliseBundle::class => ['all' => true],
];
```

### Step 3: Set the API key

[](#step-3-set-the-api-key)

Finally, update your `.env` file by setting the Localise API key of your account:

```
###> cosavostra/localise-bundle ###
LOCALISE_EXPORT_KEY=XXXXXXXXXXXXXXX
###> cosavostra/localise-bundle ###
```

Usage
=====

[](#usage)

This bundle is very useful to import translation files from Localise.biz, after installation you'll be able to access to the command:

```
$ php bin/console localise:translation:import --extension=yaml --purge
```

The output will be similar to below:

```
 ----------------- ------ ------------ --------------
  Name              Code   Translated   Untranslated
 ----------------- ------ ------------ --------------
  English US        en     3            0
  French (France)   fr     3            0
 ----------------- ------ ------------ --------------
 [OK] The translations was successfully imported.
```

**NOTE:** Don't forget to clear the cache of your application after running the command, and consider using the right environment option, in your prod environment you should run:

**NOTE:** The following extensions are supported:

- Yaml
- PHP
- XLF

```
$ php bin/console --env=prod localise:translation:import --extension=yaml --purge
```

You can also use the `CosaVostra\LocaliseBundle\LocaliseManager` service to import translations manually (for example in a controller) like below:

```
use CosaVostra\LocaliseBundle\LocaliseManager;
use Symfony\Component\HttpFoundation\Response;

public function action(LocaliseManager $localiseManager): Response
{
    $extension = 'yaml';
    $purge = true; // This flag should be "TRUE" to purge translation directory and remove old files.

    $localiseManager->import($extension, $purge);

    // Clear the cache manually here ...

    return new Response('Translations imported.');
}
```

Questions?
----------

[](#questions)

If you have any questions please [open an issue](https://github.com/mradhi/localise-bundle/issues/new).

License
-------

[](#license)

This library is released under the MIT License. See the bundled [LICENSE](https://github.com/mradhi/localise-bundle/blob/master/LICENSE) file for details.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Total

13

Last Release

2189d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15831692?v=4)[Mohamed Radhi Guennichi](/maintainers/mradhi)[@mradhi](https://github.com/mradhi)

---

Tags

translatetranslationlocaliseLocalise.biz

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cosavostra-localise-bundle/health.svg)

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

###  Alternatives

[willdurand/js-translation-bundle

A pretty nice way to expose your translation messages to your JavaScript.

58917.1M55](/packages/willdurand-js-translation-bundle)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42510.8M63](/packages/jms-translation-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)

PHPackages © 2026

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