PHPackages                             openeuropa/oe\_multilingual - 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. openeuropa/oe\_multilingual

ActiveDrupal-module[Localization &amp; i18n](/categories/localization)

openeuropa/oe\_multilingual
===========================

Multilingual features for the OpenEuropa project.

1.22.0(6mo ago)3148.7k↓28.4%3[5 PRs](https://github.com/openeuropa/oe_multilingual/pulls)10EUPL-1.2PHPPHP &gt;=8.1

Since May 29Pushed 2mo ago24 watchersCompare

[ Source](https://github.com/openeuropa/oe_multilingual)[ Packagist](https://packagist.org/packages/openeuropa/oe_multilingual)[ RSS](/packages/openeuropa-oe-multilingual/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (72)Used By (10)

OpenEuropa Multilingual
=======================

[](#openeuropa-multilingual)

[![Build Status](https://camo.githubusercontent.com/a1485a72aafd09c4c4bf53cd46bbd9b2ae188aedeeb0c3a1f60641c868af2b87/68747470733a2f2f64726f6e652e66706669732e65752f6170692f6261646765732f6f70656e6575726f70612f6f655f6d756c74696c696e6775616c2f7374617475732e7376673f6272616e63683d6d6173746572)](https://drone.fpfis.eu/openeuropa/oe_multilingual)

The OpenEuropa Multilingual module offers default multilingual features for the OpenEuropa project, like:

- Enable all 24 official EU languages
- Provide an optional language switcher block on the [OpenEuropa Theme](https://github.com/openeuropa/oe_theme) site header region
- Make sure that the administrative interface is always set to English
- Allow English to be translated so that the default English copy may be fixed or improved, if necessary
- Configure the site to follow [IPG rules for Language Negotiation](http://ec.europa.eu/ipg/print/print_all_content/index_en.htm#3.0), using the path suffix. *(optional)*

**Table of contents:**

- [Installation](#installation)
- [Development](#development)
    - [Project setup](#project-setup)
    - [Using Docker Compose](#using-docker-compose)
    - [Disable Drupal 8 caching](#disable-drupal-8-caching)
- [Demo module](#demo-module)
- [Contributing](#contributing)
- [Versioning](#versioning)

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

[](#installation)

The recommended way of installing the OpenEuropa Multilingual module is via [Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).

```
composer require openeuropa/oe_multilingual
```

### Enable the module

[](#enable-the-module)

In order to enable the module in your project run:

```
./vendor/bin/drush en oe_multilingual
```

Development
-----------

[](#development)

The OpenEuropa Multilingual project contains all the necessary code and tools for an effective development process, such as:

- All PHP development dependencies (Drupal core included) are required by [composer.json](composer.json)
- Project setup and installation can be easily handled thanks to the integration with the [Task Runner](https://github.com/openeuropa/task-runner) project.
- All system requirements are containerized using [Docker Composer](https://docs.docker.com/compose)

### Project setup

[](#project-setup)

Download all required PHP code by running:

```
composer install
```

This will build a fully functional Drupal test site in the `./build` directory that can be used to develop and showcase the module's functionality.

Before setting up and installing the site make sure to customize default configuration values by copying [runner.yml.dist](runner.yml.dist)to `./runner.yml` and overriding relevant properties.

This will also:

- Symlink the module in `./build/modules/custom/oe_multilingual` so that it's available for the test site
- Setup Drush and Drupal's settings using values from `./runner.yml.dist`
- Setup PHPUnit and Behat configuration files using values from `./runner.yml.dist`

**Please note:** project files and directories are symlinked within the test site by using the [OpenEuropa Task Runner's Drupal project symlink](https://github.com/openeuropa/task-runner-drupal-project-symlink) command.

If you add a new file or directory in the root of the project, you need to re-run `drupal:site-setup` in order to make sure they are be correctly symlinked.

If you don't want to re-run a full site setup for that, you can simply run:

```
$ ./vendor/bin/run drupal:symlink-project

```

After a successful setup install the site by running:

```
./vendor/bin/run drupal:site-install
```

This will:

- Install the test site
- Enable the OpenEuropa Multilingual module
- Enable the OpenEuropa Multilingual Demo module and [Configuration development](https://github.com/openeuropa/oe_theme#project-setup) modules
- Enable and set the OpenEuropa Theme as default

### Using Docker Compose

[](#using-docker-compose)

Alternatively, you can build a development site using [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/) with the provided configuration.

Docker provides the necessary services and tools such as a web server and a database server to get the site running, regardless of your local host configuration.

#### Requirements:

[](#requirements)

- [Docker](https://www.docker.com/get-docker)
- [Docker Compose](https://docs.docker.com/compose/)

#### Configuration

[](#configuration)

By default, Docker Compose reads two files, a `docker-compose.yml` and an optional `docker-compose.override.yml` file. By convention, the `docker-compose.yml` contains your base configuration and it's provided by default. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services. If a service is defined in both files, Docker Compose merges the configurations.

Find more information on Docker Compose extension mechanism on [the official Docker Compose documentation](https://docs.docker.com/compose/extends/).

#### Usage

[](#usage)

To start, run:

```
docker-compose up
```

It's advised to not daemonize `docker-compose` so you can turn it off (`CTRL+C`) quickly when you're done working. However, if you'd like to daemonize it, you have to add the flag `-d`:

```
docker-compose up -d
```

Then:

```
docker-compose exec web composer install
docker-compose exec web ./vendor/bin/run drupal:site-install
```

Using default configuration, the development site files should be available in the `build` directory and the development site should be available at: .

#### Running the tests

[](#running-the-tests)

To run the grumphp checks:

```
docker-compose exec web ./vendor/bin/grumphp run
```

To run the phpunit tests:

```
docker-compose exec web ./vendor/bin/phpunit
```

To run the behat tests:

```
docker-compose exec web ./vendor/bin/behat
```

### Step debugging

[](#step-debugging)

To enable step debugging from the command line, pass the `XDEBUG_SESSION` environment variable with any value to the container:

```
docker-compose exec -e XDEBUG_SESSION=1 web
```

Please note that, starting from XDebug 3, a connection error message will be outputted in the console if the variable is set but your client is not listening for debugging connections. The error message will cause false negatives for PHPUnit tests.

To initiate step debugging from the browser, set the correct cookie using a browser extension or a bookmarklet like the ones generated at .

### Disable Drupal 8 caching

[](#disable-drupal-8-caching)

Manually disabling Drupal 8 caching is a laborious process that is well described [here](https://www.drupal.org/node/2598914).

Alternatively you can use the following Drupal Console commands to disable/enable Drupal 8 caching:

```
./vendor/bin/drupal site:mode dev  # Disable all caches.
./vendor/bin/drupal site:mode prod # Enable all caches.
```

Note: to fully disable Twig caching the following additional manual steps are required:

1. Open `./build/sites/default/services.yml`
2. Set `cache: false` in `twig.config:` property. E.g.:

```
parameters:
 twig.config:
   cache: false
```

3. Rebuild Drupal cache: `./vendor/bin/drush cr`

This is due to the following [Drupal Console issue](https://github.com/hechoendrupal/drupal-console/issues/3854).

Demo module
-----------

[](#demo-module)

The OpenEuropa Multilingual module ships with a demo module which provides all the necessary configuration and code needed to showcase the modules' most important features.

The demo module includes a translatable content type with automatic URL path generation.

In order to install the OpenEuropa Multilingual demo module follow [the instructions](https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules) or enable it via [Drush](https://www.drush.org/) by running:

```
./vendor/bin/drush en oe_multilingual_demo -y
```

Known Issues
------------

[](#known-issues)

##### Enabling string English string translation

[](#enabling-string-english-string-translation)

Enabling English string translation can have unintended consequences when making changes to translatable configuration entities. If these strings are available in locale, the change would get saved as EN translations.
=========================================================================================================================================================================================================================

[](#enabling-english-string-translation-can-have-unintended-consequences-when-making-changes-to-translatable-configuration-entitiesif-these-strings-are-available-in-locale-the-change-would-get-saved-as-en-translations)

Enabling URL suffix
-------------------

[](#enabling-url-suffix)

This is optional and should be done only if your website should follow the [IPG rules](http://ec.europa.eu/ipg/print/print_all_content/index_en.htm#3.0) for language negotiation.

In order to use this feature you need to enable the OpenEuropa Multilingual URL Suffix module by following [these instructions](https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules) or via [Drush](https://www.drush.org/) by running:

```
./vendor/bin/drush en oe_multilingual_url_suffix -y
```

After enabling the module:

1. Go to `admin/config/regional/language/detection`
2. Disable the `URL` method in `Interface text language detection` and `Content language detection`;
3. Enable the `URL suffix` method in `Interface text language detection` and `Content language detection`;
4. Make sure that the `URL suffix` method is located on top of list but after the `Administration pages` negotiation method, if you use it
5. Save new order
6. If necessary configure the `URL suffix` method by clicking on `Configure`
7. Rebuild cache

### URL suffix usage

[](#url-suffix-usage)

- It is strongly recommended to avoid an usage of the language suffix separator (`_`) in their pathauto patterns/aliases as it might lead to unexpected behaviors.
- Drush user:login(uli) implementation does not currently work with oe\_multilingual\_url\_suffix module. The following [patch](https://patch-diff.githubusercontent.com/raw/drush-ops/drush/pull/4209.diff) is required to correctly generate the url.

Contributing
------------

[](#contributing)

Please read [the full documentation](https://github.com/openeuropa/openeuropa) for details on our code of conduct, and the process for submitting pull requests to us.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the available versions, see the [tags on this repository](https://github.com/openeuropa/oe_multilingual/tags).

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance79

Regular maintenance activity

Popularity37

Limited adoption so far

Community35

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor4

4 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 ~59 days

Recently: every ~162 days

Total

47

Last Release

182d ago

Major Versions

0.5.0 → 1.0.02019-05-15

PHP version history (6 changes)0.1.0PHP ^7.1

1.4.0PHP &gt;=7.2

1.7.0PHP &gt;=7.3

1.10.0PHP &gt;=7.4

1.12.0PHP &gt;=8.0

1.18.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/8562a7045bde4094cf1252195ae47001970518ed7281b9e13caa6b6ffea03a5b?d=identicon)[ademarco](/maintainers/ademarco)

![](https://www.gravatar.com/avatar/d3b1f4079f9a82f6dd88fe6577d1256b4ecbbccbcd4a4ec9bea7c2fd6f72b99a?d=identicon)[DIGIT-CORE](/maintainers/DIGIT-CORE)

---

Top Contributors

[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (80 commits)")[![upchuk](https://avatars.githubusercontent.com/u/5848933?v=4)](https://github.com/upchuk "upchuk (68 commits)")[![imanoleguskiza](https://avatars.githubusercontent.com/u/14978592?v=4)](https://github.com/imanoleguskiza "imanoleguskiza (67 commits)")[![nagyad](https://avatars.githubusercontent.com/u/22004498?v=4)](https://github.com/nagyad "nagyad (65 commits)")[![sergepavle](https://avatars.githubusercontent.com/u/9432036?v=4)](https://github.com/sergepavle "sergepavle (59 commits)")[![22Alexandra](https://avatars.githubusercontent.com/u/22908988?v=4)](https://github.com/22Alexandra "22Alexandra (50 commits)")[![voidtek](https://avatars.githubusercontent.com/u/186827?v=4)](https://github.com/voidtek "voidtek (36 commits)")[![brummbar](https://avatars.githubusercontent.com/u/8488617?v=4)](https://github.com/brummbar "brummbar (34 commits)")[![hernani](https://avatars.githubusercontent.com/u/707860?v=4)](https://github.com/hernani "hernani (19 commits)")[![richardcanoe](https://avatars.githubusercontent.com/u/1321598?v=4)](https://github.com/richardcanoe "richardcanoe (16 commits)")[![pfrenssen](https://avatars.githubusercontent.com/u/442924?v=4)](https://github.com/pfrenssen "pfrenssen (9 commits)")[![netlooker](https://avatars.githubusercontent.com/u/7669736?v=4)](https://github.com/netlooker "netlooker (7 commits)")[![yenyasinn](https://avatars.githubusercontent.com/u/1183951?v=4)](https://github.com/yenyasinn "yenyasinn (5 commits)")[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (5 commits)")[![aritomelo](https://avatars.githubusercontent.com/u/9381722?v=4)](https://github.com/aritomelo "aritomelo (5 commits)")[![lisotton](https://avatars.githubusercontent.com/u/1653860?v=4)](https://github.com/lisotton "lisotton (4 commits)")[![piotrsmykaj](https://avatars.githubusercontent.com/u/10449853?v=4)](https://github.com/piotrsmykaj "piotrsmykaj (4 commits)")[![intelektron](https://avatars.githubusercontent.com/u/3647601?v=4)](https://github.com/intelektron "intelektron (1 commits)")

### Embed Badge

![Health badge](/badges/openeuropa-oe-multilingual/health.svg)

```
[![Health](https://phpackages.com/badges/openeuropa-oe-multilingual/health.svg)](https://phpackages.com/packages/openeuropa-oe-multilingual)
```

###  Alternatives

[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)

PHPackages © 2026

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