PHPackages                             coffreo/jms-translation-js-extractor-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. coffreo/jms-translation-js-extractor-bundle

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

coffreo/jms-translation-js-extractor-bundle
===========================================

Add javascript translation extractor for jms/translation-bundle package

0.1.0(7y ago)04.2k[2 issues](https://github.com/Coffreo/jms-translation-js-extractor-bundle/issues)MITPHPPHP ^5.6 || ^7.0

Since Apr 25Pushed 7y ago2 watchersCompare

[ Source](https://github.com/Coffreo/jms-translation-js-extractor-bundle)[ Packagist](https://packagist.org/packages/coffreo/jms-translation-js-extractor-bundle)[ RSS](/packages/coffreo-jms-translation-js-extractor-bundle/feed)WikiDiscussions master Synced 2mo ago

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

Coffreo/jms-translation-js-extractor-bundle
===========================================

[](#coffreojms-translation-js-extractor-bundle)

By [Coffreo](https://coffreo.biz)

[![PHP compatible version](https://camo.githubusercontent.com/2acc7e07a5cde88369d8b3f4c753eb9696f996ce5b2c89cac514e5a5343c37a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f436f666672656f2f6a6d732d7472616e736c6174696f6e2d6a732d657874726163746f722d62756e646c652e737667)](https://camo.githubusercontent.com/2acc7e07a5cde88369d8b3f4c753eb9696f996ce5b2c89cac514e5a5343c37a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f436f666672656f2f6a6d732d7472616e736c6174696f6e2d6a732d657874726163746f722d62756e646c652e737667)[![Build Status](https://camo.githubusercontent.com/53fb3a26ba75213395eb976f2d59470d93dc981179e40f7498e9f210e54160bd/68747470733a2f2f7472617669732d63692e6f72672f436f666672656f2f6a6d732d7472616e736c6174696f6e2d6a732d657874726163746f722d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Coffreo/jms-translation-js-extractor-bundle)[![Coverage](https://camo.githubusercontent.com/583d382227545fa83a0505f32cb4ee1751e2ea2b0ac156c760cf52eb85b4f7fe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636f666672656f2f6a6d732d7472616e736c6174696f6e2d6a732d657874726163746f722d62756e646c652e737667)](https://scrutinizer-ci.com/g/coffreo/jms-translation-js-extractor-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1c5bda7c517d0e25c4629809491388fe08e7bd7d9a7a320e68f0af06330b1e6a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f666672656f2f6a6d732d7472616e736c6174696f6e2d6a732d657874726163746f722d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Coffreo/jms-translation-js-extractor-bundle/?branch=master)

Extract translations from Javascript source files.

- **Recommended** [`willdurand/js-translation-bundle`](https://github.com/willdurand/BazingaJsTranslationBundle)

> Same bundle exists for [PHP Translation](https://php-translation.readthedocs.io/en/latest/): see [Coffreo/php-translation-js-extractor-bundle](https://github.com/Coffreo/php-translation-js-extractor-bundle)

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

[](#installation)

### Application with Symfony flex

[](#application-with-symfony-flex)

```
composer require coffreo/jms-translation-js-extractor-bundle

```

### Application without Symfony flex

[](#application-without-symfony-flex)

- Install bundle:

    ```
    composer require coffreo/jms-translation-js-extractor-bundle

    ```
- Enable bundle:

    - symfony 3.\*

        ```
        // config/AppKernel.php
        public function registerBundles()
        {
            return array(
                // ...
                new Coffreo\JMSTranslationJsExtractorBundle\CoffreoJMSTranslationJsExtractorBundle(),
                // ...
            );
        }
        ```
    - symfony 4.\* (if not already added by `symfony/flex`)

        ```
        // config/bundles.php

        return [
            // ...
            Coffreo\JMSTranslationJsExtractorBundle\CoffreoJMSTranslationJsExtractorBundle::class => ['all' => true],
        ];
        ```

Usage
-----

[](#usage)

This bundle allow extraction of translated strings in javascript files using [Coffreo/js-translation-extractor](https://github.com/Coffreo/js-translation-extractor).

No specific command line to use, just use originals `jms/translation-bundle` commands:

```
$ bin/console translation:extract --config=app en
```

Translations found are automatically added to current translations files as PHP, twig ones.

### Configuration

[](#configuration)

This bundle doesn't need configuration.
However, to extract strings from JS files, you must indicate where are stored your JS files in [`jms/translation-bundle` configuration](http://jmsyst.com/bundles/JMSTranslationBundle/master/cookbook/extraction_configs).

```
# paths below are symfony 3.X paths, make sure to change them for symfony 4.X
# app/config.yml
jms_translation:
  configs:
      app:
          dirs: [
            "%kernel.root_dir%",
            "%kernel.root_dir%/../src",
            "%kernel.root_dir%/../path/to/assets"   # add assets path here
          ]
          output_dir: "%kernel.root_dir%/Resources/translations"
          ignored_domains: [routes]
          excluded_names: ["*TestCase.php", "*Test.php"]
          excluded_dirs: [cache, data, logs]

```

Developer commands
------------------

[](#developer-commands)

- Run tests:

```
composer test
```

- Apply coding standard

```
composer cs
```

**Coding standard must be applied before commit, TravisCI will fail otherwise**

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2574d ago

### Community

Maintainers

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

---

Top Contributors

[![emri99](https://avatars.githubusercontent.com/u/6652177?v=4)](https://github.com/emri99 "emri99 (1 commits)")

---

Tags

i18ntranslatejavascripttranslationJSjs-translationbazingajms-translation-bundle

### Embed Badge

![Health badge](/badges/coffreo-jms-translation-js-extractor-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/coffreo-jms-translation-js-extractor-bundle/health.svg)](https://phpackages.com/packages/coffreo-jms-translation-js-extractor-bundle)
```

###  Alternatives

[gettext/gettext

PHP gettext manager

70530.2M102](/packages/gettext-gettext)[mariuzzo/laravel-js-localization

Laravel Localization in JavaScript

6073.9M3](/packages/mariuzzo-laravel-js-localization)[skillshare/formatphp

Internationalize PHP apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.

8029.6k](/packages/skillshare-formatphp)[om/potrans

Command line tool for translate Gettext with Google Translator API or DeepL API

10515.0k4](/packages/om-potrans)[fisharebest/localization

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

3191.1k2](/packages/fisharebest-localization)[michele-angioni/laravel-js-lang-converter

Laravel Localization in JavaScript

2565.2k](/packages/michele-angioni-laravel-js-lang-converter)

PHPackages © 2026

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