Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects

WEB-T Magento extension

Website translation extension for Magento Open Source, that automatically translates every frontend page by including Javascript WEB-T website translation widget. This widget connects with a Translation Hub, which contains website translation configuration, machine-translation and translation editing capabilities.

Dependencies

  • Translation Hub (TH) - a service that communicates with the JS widget, providing selected language list and translations to HTML page source texts. Before setting up this Magento extension, TH must be set up and website integration data (source, target languages, MT provider information) must be added to it. TH must be accessible from your Magento website via HTTPS. You can set up your own TH instance or use any publicly available instance. To link this extension with the TH, you will need to provide TH URL and integration Client ID (generated by TH) in the extension settings.

Solution architecture

Architecture

Installation

  1. Run npm install
  2. (Optional) Add Translation Hub URL to CSP whitelist, if it is not allowed by Content Security Policy:
    • Change localhost to your custom URL in europeancommission/webt/etc/csp_whitelist.xml
  3. Copy europeancommission folder to [Magento root dir]/app/code/
  4. SSH into Magento instance and execute: 3.1. Change workdir to [Magento root dir] 3.2. Enable europeancommission_webt module: php bin/magento module:enable europeancommission_webt 3.3. Update DB: php bin/magento setup:upgrade 3.4. Clean cache: php bin/magento cache:clean 3.5. Generate classes: php bin/magento setup:di:compile 3.6. (Optional) Fix permissions for [Magento root dir]/var folder, if they have changed after executing any of previous commands (See: https://magento.stackexchange.com/questions/209373/missing-permission-in-var-folders-after-enable-module).
    • e.g. for Apache: chown -R daemon:root [Magento root dir]/var/
  5. Restart Magento instance

Extension configuration

  1. Open Admin panel
  2. Go to Stores -> Configuration
  3. Under tab General open WEB-T Settings
  4. Enter Translation Hub URL, Client ID and click Save Config
  5. Open any frontend page, WEB-T Website translation widget should be visible on the top of every page.

Screenshots

Settings
Extension settings
Frontend view
Frontend view

Licence

This extension is licensed under the Apache 2.0 license.