Name: oe_multilingual
Owner: OpenEuropa
Description: OpenEuropa Multilingual module.
Created: 2018-04-26 16:19:07.0
Updated: 2018-05-25 14:21:06.0
Pushed: 2018-05-25 14:44:26.0
Homepage: null
Size: 83
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The OpenEuropa Multilingual module offers default multilingual features for the OpenEuropa project, like:
Table of contents:
The recommended way of installing the OpenEuropa Multilingual module is via a Composer-based workflow.
In your Drupal project's main composer.json
add the following dependency:
"require": {
"openeuropa/oe_multilingual": "dev-master"
}
And run:
mposer update
In order to enable the module in your project run:
vendor/bin/drush en oe_multilingual
The OpenEuropa Multilingual project contains all the necessary code and tools for an effective development process, such as:
Download all required PHP code by running:
mposer 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.
During development the module requires a fully functional OpenEuropa Theme to be present and enabled on the test site.
In order to achieve that we need to manually install and build all frontend-related theme dependencies as described in the “Project setup” section of the OpenEuropa Theme documentation.
In short:
build/themes/contrib/oe_theme
m install
m run build
In order to fetch the required code you'll need to have Node.js (>= 8) installed locally.
Before setting up and installing the site make sure to customize default configuration values by copying runner.yml.dist
to ./runner.yml
and overriding relevant properties.
To set up the project run:
vendor/bin/run drupal:site-setup
This will:
./build/modules/custom/oe_multilingual
so that it's available for the test site./runner.yml.dist
./runner.yml.dist
After a successful setup install the site by running:
vendor/bin/run drupal:site-install
This will:
The setup procedure described above can be sensitively simplified by using Docker Compose.
Requirements:
Run:
cker-compose up -d
Then:
cker-compose exec -u web web composer install
cker-compose exec -u node node npm install
cker-compose exec -u node node npm run build
cker-compose exec -u web web ./vendor/bin/run drupal:site-setup
cker-compose exec -u web web ./vendor/bin/run drupal:site-install
Your test site will be available at http://localhost:8080/build.
Run tests as follows:
cker-compose exec -u web web ./vendor/bin/phpunit
cker-compose exec -u web web ./vendor/bin/behat
Manually disabling Drupal 8 caching is a laborious process that is well described here.
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:
./build/sites/default/services.yml
cache: false
in twig.config:
property. E.g.:meters:
.config:
e: false
./vendor/bin/drush cr
This is due to the following Drupal Console issue.
The OpenEuropa Multilingual module ships with a demo module which provides all the necessary configuration and code needed to showcase the modules's 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 here or enable it via Drush by running:
vendor/bin/drush en oe_multilingual_demo -y