# experius/module-missingtranslations

> Collect missing translations in specified folder or the entire Magento 2 Root. Adds database editing and management of translations.

`composer require experius/module-missingtranslations`

Canonical URL: https://packagento.com/experius/module-missingtranslations

## At a glance

- **Vendor**: experius (https://packagento.com/experius.md)
- **Latest version**: 4.0.6 — released 2025-12-04
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/experius/module-missingtranslations and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require experius/module-missingtranslations:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Collect missing translations in specified folder or the entire Magento 2 Root. Adds database editing and management of translations.

## README

Mage2 Module Experius MissingTranslations
====================

Add a CLI command to Collect missing translations in specified folder or the entire Magento 2 Root and add an Admin Grid to display and update or add database/inline translations `(Stores > Translations > Database/Inline Translations)`


   ``experius/module-missingtranslations``
   
 - [Main Functionalities](#markdown-header-main-functionalities)
 - [Configuration](#markdown-header-configuration)
 - [Additional Information](#markdown-header-additional-information)
 - [Todo](#markdown-header-todo)

- - -

## Main Functionalities

 - Recommended Minimum Usage
 - Missing Translations
 - Translations to database (Existing and Missing)

### Recommended Minimum Usage

 - Use the command to generate the CSV File with Missing Translations for your Locales 
   - **CSV File for Missing Translations**
 - Use the command to manually collect and import Existing & Missing Translations for your Locales
   - **Manually - Collect and Import**
 - *Optional* Enable the Cronjobs in the configuration so the Database Translations will be up to date with New Modules
   - **Cronjob - Collect and Import** and **Configuration**


### Missing Translations
#### CSV File for Missing Translations

It is possible to generate a CSV file which contains the original string and an empty string.

##### Command
This CSV file can be generated through the following command:

```
php bin/magento experius_missingtranslations:collect [-m|--magento] [-l|--locale="..."] [-s|--store="..."] [directory]
```

Use the command like this:

```
php bin/magento experius_missingtranslations:collect --magento --locale nl_NL
```

##### Usage 1 - Transform Fully Translated File to Language Pack

This file can be used by a **Translation Agency** to complete the translations for the webshop.

After the **Translation Agency** has fully translated the csv file it is possible to transform it to a language pack.

This can be done by removing the suffix `missing` and eventually transform it to a language pack by adding a `language.xml` and a `registration.php`


##### Usage 2 - Translate Missing Strings Through the Admin with the CSV File

Besides transforming the file to a language pack it is possible to add new translations through the admin interface, which can be found under `Stores > Translations > Database / Inline`

**only if you generated it to a file with the following filename a file in app/i18n/Vendor/missing/locale_code.csv. (Example:  app/i18n/Vendor/missing/nl_NL.csv.)** 


##### Usage 3 - Import the Missing Translations into the Database*
For this functionality see **Translations to database (Existing and Missing)**



### Translations to database (Existing and Missing)

In addition to gathering missing translations this module also supports database translation (formerly known as inline translate)

This makes it possible for merchants to edit any translation in the Magento Admin Panel.

#### Cronjob - Collect and Import
Collecting and importing the translations happens nightly when it is enabled **by default this functionality is disabled**
This is done on global scope for all locales that are used in at least one storeview (based on the configured locales).

##### Existing CSV Translations
*03:13 AM server time, all existing csv translations are added to the database.*

This functionality Imports the Existing CSV Translations into the Database then the Original String will differ from the Translated String.


##### Missing Translations
*03:23 AM server time, all missing translations found are added to the database.*

This functionality Imports the Missing Translations into the Database then the Original String will be equal to the Translated String.


#### Manually - Collect and Import
Manually gathering the translations (and adding them to the database) is possible.
This can be done by one of the following two Console commands:
```
php bin/magento experius_missingtranslations:existing-translations-to-database --global --locale nl_NL
```

```
php bin/magento experius_missingtranslations:missing-translations-to-database --global --locale nl_NL
```
Herein --global is defined to save the translations for any storeview with the specified locale

To specify a specific store_id add the store ID parameter (--store [store_id])
WARNING: This is not recommended unless translations differ for the same language in separate storeviews
Example:
```
php bin/magento experius_missingtranslations:addtodatabase --store 1 --locale nl_NL
```

## Configuration

 - Define Vendor which is used for generating the Missing Translations CSV Files
   - `(Stores > Settings > Configuration > General > General > Locale Options > Language vendor for missing translations)`
 - Enable the Collect and Import for Existing Translations
   - `(Stores > Settings > Configuration > General > General > Locale Options > Existing translations cron enabled)`
 - Enable the Collect and Import for Missing Translations
   - `(Stores > Settings > Configuration > General > General > Locale Options > Missing translations cron enabled)`

## TODO

For database translations
- Add flag to translation table database (user_defined); if user edit's a translation, user_defined is flagged as true.
- Add --force update for every entry that is not flagged as user_defined; to update csv changes into database.

## Changelog

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/4.0.3)

*  [FEATURE][RM-811] reintroduced set area code for console commands *(Dylan Maurits)*


### 4.0.2 (2023-03-07)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/4.0.2)

*  [FEATURE][PPC-863] Fixed console commands *(Quinn Stadens)*


### 4.0.1 (2022-09-22)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/4.0.1)

*  [HOTFIX][NEND-609] PHP compatibility is not up-to-date in composer.json. Add 8.0 and 8.1. *(Boris van Katwijk)*


### 4.0.0 (2022-09-19)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/4.0.0)

*  [SOLUI-101] Removed option to update to JS-Translations.json *(florisschreuder)*
*  [FEATURE][SOLUI-101] Removed reference to updating JS-Translation.json *(florisschreuder)*
*  [FEATURE][SOLUI-101] Removed reference to updating JS-Translation.json *(florisschreuder)*
*  [FEATURE][SOLUI-101] Added a notice for JS translations *(florisschreuder)*
*  [FEATURE][SOLUI-101] Added a notice for JS Translations *(florisschreuder)*
*  Update Phrase.php *(pierre-denissen)*
*  [FEATURE][BACI-66] Refactor module for php 7.4+ compatibility *(Matthijs Breed)*
*  [FEATURE][BACI-66] *(Matthijs Breed)*
*  [FEATURE][BACI-66] Code cleanup from tests *(Matthijs Breed)*
*  [BUGFIX][BACI-66] Experius\MissingTranslations\Model\TranslationCollector::updateTranslationDatabase(): Argument #1 ($storeId) must be of type int, string given *(Boris van Katwijk)*
*  [FEATURE][BACI-66] Add "success" parameter if Console commands complete succesfully. *(Boris van Katwijk)*


### 3.2.3 (2021-09-27)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.2.3)

*  Remove use of warning suppression with @ symbol *(Martijn van den Kerkhof)*


### 3.2.2 (2021-08-09)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.2.2)

*  [BUGFIX][HELV-93] Cast community translations to strings to prevent type error on string specific functions *(matthijs-breed-experius)*


### 3.2.1 (2021-04-07)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.2.1)

*  [BUGFIX] Removed module security from filters *(Hexmage)*


### 3.2.0 (2021-01-27)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.2.0)

*  [BUGFIX][BACI-391] - Fix error "Cannot open file for write dictionary" when locale file is non-existent *(Ruben Panis)*
*  [FEATURE][S-323] Added fallback for e.g., Magento Cloud, where /app directory has no write access *(Bas van der Louw)*


### 3.1.2 (2020-11-16)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.1.2)

*  [BUGFIX] Solved Uncaught TypeError: preg_match_all() expects parameter 2 to be string, bool given *(Mr. Lewis)*


### 3.1.1 (2020-11-05)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.1.1)

*  [BUGFIX] Solved empty $fileRow variable *(Mr. Lewis)*
*  [BUGFIX] Solved Uncaught TypeError: strpos() expects parameter 1 to be string, object given *(Mr. Lewis)*


### 3.1.0 (2020-10-22)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.1.0)

*  [FEATURE] [BACI-154] Added strict_types=1 and added License *(Lewis Voncken)*


### 3.0.1 (2020-10-21)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.0.1)

*  [REFACTOR] [BACI-157] Removed setup_version from module.xml *(Lewis Voncken)*


### 3.0.0 (2020-10-21)

[View Release](git@github.com:experius/Magento-2-Module-Experius-MissingTranslations.git/commits/tag/3.0.0)

_(Changelog truncated for .md surface. Full history on https://packagento.com/experius/module-missingtranslations.)_

## Recent Versions

| Version | Released |
|---|---|
| 4.0.6 | 2025-12-04 |
| 4.0.5 | 2025-10-17 |
| 4.0.4 | 2023-12-21 |
| 4.0.3 | 2023-08-29 |
| 4.0.2 | 2023-03-07 |
| 4.0.1 | 2022-09-22 |
| 4.0.0 | 2022-09-19 |
| 3.2.3 | 2021-09-27 |
| 3.2.2 | 2021-08-09 |
| 3.2.1 | 2021-04-07 |

Showing 10 of 50 versions. Full release history on https://packagento.com/experius/module-missingtranslations.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| experius/module-formselectchosen | 1.0.* |
| php | ^7.4 \|\| ^8.0 \|\| ^8.1 |

## Quality

Latest release (4.0.6) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | 1 | 1 |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 158 | 158 warnings (ruleset: Magento2) — 41 auto-fixable with phpcbf |
| PHPMD | Warning | 47 | 47 rule violations (MissingImport:32, IfStatementAssignment:9, CountInLoopExpression:4, CyclomaticComplexity:1, NPathComplexity:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 37 | 37 | – | – |
| 2.4.8 | – | 37 | 37 | – |
| 2.4.9 | – | – | 40 | 40 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["experius/module-missingtranslations"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

experius is a Magento 2 vendor on Packagento. See https://packagento.com/experius.md for their full catalogue.

