Extendware Deepl Translator for Magento 2

DeepL Translator - High quality mass translations. Make instant changes to your eCcommerce Multi-Store store with the Deepl Translator, providing high quality automated translations for your products, category and shop content. Save time when updating your eCommerce store with Extendware’s Deepl Translator. With this Magento 2 Extension, you don’t have to go to each and every section (product, category, CMS pages and block) store to make changes to your field. Instead, from the DeepL Translator, you can translate a section with a single click.

Extendware’s DeepL Translator includes:

  • Translate product texts and attributes

  • Translate category texts

  • Translate CMS Pages

  • Translate CMS Blocks

  • Supported languages : All languages listed on https://developers.deepl.com/docs/resources/supported-languages

Please notice, that the extension requires a valid DeepL API key, which is available at 4,99 € per month directly at DeepL .

Installation in your Magento Online Shop

  • Note : in production please use the --keep-generated option

Type 1: Zip file

  • Unzip the zip file in app/code/Extendware

  • Enable the module by running php bin/magento module:enable Extendware_DeeplTranslator

  • Apply database updates by running php bin/magento setup:upgrade*

  • Flush the cache by running php bin/magento cache:flush

Configuration in your Magento store

  • Api (deepltranslator/general/api)

  • Key (deepltranslator/general/key)

  • Product Attributes To Translate (deepltranslator/general/product_attributes)

  • Category Attributes To Translate (deepltranslator/general/category_attributes)

  • Page Fields To Translate (deepltranslator/general/page_fields)

  • Translation Source

Attributes

  • Product - Translation Check (translation_check)

  • Product - Translation Date (translation_date)

  • Product - Translation Source

  • Category - Translation Source

Usage

Config Setting (Store -> Configuration -> Extendware -> Deepl Translator)

  • User select paid/free version add add api key for connection also admin can select which field they want to translate using deepL as only selected product attributes would be translated alt_text

  • Select attributes which admin want to translate.

  • Translation Source system config field

    • Auto Detect

    • {all other stores} If admin need to pass any specific store locale as source_language into deepL API they can select it otherwise admin can keep “auto detect” which is default option alt_text

Attributes

  • Translation Date : When product trasnlation has been processed admin can see last translation time from grid as well as from product detail page from backend.

alt_text

  • Translation check : This attribute is for manual process as after translation if admin change/correct any translation manually and admin can set translation check = Yes and our extension will exclude that product for any further translation so admin’s manual changes won’t overrite. also admin can filter the translation check from grid.

  • alt_text

  • Product - translation source: globally if user selected any source language to pass into deepL API then same language would pass as source but if admin wanted to set different source for specific product then they can simply select different source for this specific product and if user don’t want different source then admin can keep “use config” which is default value.

  • alt_text

  • Category - translation source: globally if user selected any source language to pass into deepL API then same language would pass as source but if admin wanted to set different source for specific category then they can simply select different source for this specific category and if user don’t want different source then admin can keep “use config” which is default value.

  • alt_text

Product Translation

1. Translate using single product mode:

  • With this user can see button to do deepL translate and can select specific store for translation.

  • Please note that our translation woked based on store locale means if user select store DE then extension will take locale set to DE store and translate text into that local

  • For example if user choose DE store then in out case de_DE is store local so it will translate given text into DE language for that specific store

alt_text

2. Translate using mass update from backend grid

  • Same like single product admin can select multiple products and translate by selecting store.

  • Additional thing is message queue system which allow translation to work in backgroud and translation will be done in batches of 50 and run along with cron please check notes section for more details

  • alt_text

  • Admin can select source from mass update, here first option is “Use Attribute value” which means that for all selected product it will take source language from each product instead of setting static source for all products. for example if product A source set “store_en” and Product B source set “store_de” then by this option it will pass different source to deepL API. alt_text

3. Translate using CommandLine

 php bin/magento extendware_deepltranslator:translate -r1-2 -s2 (without message queue)
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id


php bin/magento extendware_deepltranslator:translate -r1-2 -s2 -m[username_of_admin]
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

  • Where [m] represent the username of admin where you can find queue from system->action logs

    php bin/magento extendware_deepltranslator:translate -r1-2 -s2 -f[option]

  • [f] represent the source option (if your don’t pass -f then it will be considered as “auto detect” so it’s not required option)

  • you can pass below option

    • attribute_value (take value of source from attribute)

    • default (take value of source from system config field)

    • 0 (auto_detect)

    • {any_store_id} (it will pass store lang as source)

Category Translate:

1. Using CommandLine:

php bin/magento extendware_deepltranslator:translatecategory -r1-2 -s2 (without message queue)
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

2. Using CommandLine:

php bin/magento extendware_deepltranslator:translatecategory -r1-2 -s2 -m[username_of_admin]</pre>
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

  • Where [m] represent the username of admin where you can find queue from system->action logs

    php bin/magento extendware_deepltranslator:translatecategory -r1-2 -s2 -f[option]

  • [f] represent the source option (if your don’t pass -f then it will be considered as “auto detect” so it’s not required option)

  • you can pass below option

    • attribute_value (take value of source from attribute)

    • default (take value of source from system config field)

    • 0 (auto_detect)

    • {any_store_id} (it will pass store lang as source)

3. Category Translate using single category backend

  • With this user can see button to do deepL translate and can select specific store for translation.

  • Please note that our translation woked based on store locale means if user select store DE then extension will take locale set to DE store and translate text into that local

  • For example if user choose DE store then in out case de_DE is store local so it will translate given text into DE language for that specific store

alt_text

Attribute Translate:

1. Using CommandLine:

php bin/magento extendware_deepltranslator:translateattribute -r1-2 -s2 (without message queue)
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

2. Using CommandLine:

php bin/magento extendware_deepltranslator:translateattribute -r1-2 -s2 -m[username_of_admin]
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

  • Where [m] represent the username of admin where you can find queue from system->action logs

    php bin/magento extendware_deepltranslator:translateattribute -r1-2 -s2 -f[option]

  • [f] represent the source option (if your don’t pass -f then it will be considered as “auto detect” so it’s not required option)

  • you can pass below option

    • default (take value of source from system config field)

    • 0 (auto_detect)

    • {any_store_id} (it will pass store lang as source)

2. Attribute Translate using single Attribute backend

  • With this user can see button to do deepL translate and can select specific store for translation.

  • Please note that our translation woked based on store locale means if user select store DE then extension will take locale set to DE store and translate text into that local

  • For example if user choose DE store then in out case de_DE is store local so it will translate given text into DE language for that specific store

alt_text

Page Translate:

1. Using CommandLine:

php bin/magento extendware_deepltranslator:translatepage -r2-4 -s2 (without message queue)
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

    php bin/magento extendware_deepltranslator:translatepage -r2-4 -s2 -m[username_of_admin]

  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

  • Where [m] represent the username of admin where you can find queue from system->action logs

    php bin/magento extendware_deepltranslator:translatepage -r2-4 -s2 -f[options]

  • [f] represent the source option (if your don’t pass -f then it will be considered as “auto detect” so it’s not required option)

  • you can pass below option

    • default (take value of source from system config field)

    • 0 (auto_detect)

    • {any_store_id} (it will pass store lang as source)

3. Page Translate using single page backend

  • With this user can see button to do deepL translate and can select specific store for translation.

  • Please note that our translation woked based on store locale means if user select store DE then extension will take locale set to DE store and translate text and create new page with DE store.

  • If URL key exist for DE store then it will throw error as page for DE store is already there

  • This will also remove DE store ID from main page

  • For example there is a page which is assigned to all stores and if user click on translate for DE store then if translation is successful then user can see new page with only DE store assign and in main page DE store was removed.

alt_text

alt_text

[Update in v1.6.x]

  • Now we have now had two additional fields on the CMS Page, Translation Date and Translation Identifier.

  • CMS Page Translation is connected with a Translation Identifier to each store.

  • When you save the CMS page it’s checked for Translation Identifier unique validation. So Translation Identifier connects the CMS page in the translation process.

  • When you have many pages then you can use our mass action feature to update the Translation Identifier on many CMS pages. Which sets the URL key as Translation Identifier

alt_text

alt_text

4) Translate using mass update from backend grid

  • Same like single Page admin can select multiple pages and translate by selecting store.

  • Additional thing is message queue system which allow translation to work in backgroud and translation will be done in batches of 20 and run along with cron please check notes section for more details

alt_text

Block Translate:

1) Using CommandLine:

php bin/magento extendware_deepltranslator:translateblock -r2-4 -s2 (without message queue)
  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

    php bin/magento extendware_deepltranslator:translateblock -r2-4 -s2 -m[username_of_admin]

  • Where [r] represent product range user can define range with product id like 1-20

  • Where [s] represent store id

  • Where [m] represent the username of admin where you can find queue from system->action logs

    php bin/magento extendware_deepltranslator:translatepage -r2-4 -s2 -f[options]

  • [f] represent the source option (if your don’t pass -f then it will be considered as “auto detect” so it’s not required option)

  • you can pass below option

    • default (take value of source from system config field)

    • 0 (auto_detect)

    • {any_store_id} (it will pass store lang as source)

3) Block Translate using single block backend

  • With this user can see button to do deepL translate and can select specific store for translation.

  • Please note that our translation woked based on store locale means if user select store DE then extension will take locale set to DE store and translate text and create new block with DE store.

  • If URL key exist for DE store then it will throw error as block for DE store is already there

  • This will also remove DE store ID from main block

  • For example there is a block which is assigned to all stores and if user click on translate for DE store then if translation is successful then user can see new block with only DE store assign and in main block DE store was removed.

alt_text

alt_text

4) Translate using mass update from backend grid

  • Same like single block admin can select multiple pages and translate by selecting store.

  • Additional thing is message queue system which allow translation to work in backgroud and translation will be done in batches of 20 and run along with cron please check notes section for more details

alt_text

Notes

  • To do translation with command line please make sure cron is ruuning fine in your magento instance

  • To check it you can run

      crontab -l
    
  • Also run cron manually you can goto root of magento installation and run

      php bin/magento cron:run
    
  • Also there is a manual way to to run translation without running cron by using

      bin/magento queue:consumers:start product_action_attribute.translate --max-messages=10000
    
  • Any translation with message queue admin can check progress from System -> Bulk Actions

alt_text

How to Completely Uninstall the Extension

To uninstall the extension completely, please adhere to the steps outlined on the official site. This extension utilizes product attributes, and upon uninstallation, all associated data will be removed.

If you utilize the disable command to remove the module, please note that it will not completely remove the data.

For detailed instructions, refer to the official guide: Uninstall Modules.

Error Handling Guide for API Response Status Codes

  • Status Code: 400

    Error Message: There has been an issue with your parameters.

    Action: Review the parameters being sent in the request and ensure they meet the required format and values.

  • Status Code: 403

    Error Message: Authorization failed. Please check the auth_key

    Action: Review the parameters being sent in the request and ensure they meet the required format and values. For additional information about this particular issue, refer to the following link: Authorization Failed

  • Status Code: 413

    Error Message: Request Entity size exceeds

    Action: If you are encountering this error, consider optimizing the payload being sent in the request to reduce its size.

  • Status Code: 429

    Error Message: Too many requests. Please wait and try again

    Action: This error indicates that you have exceeded the rate limit for API requests. Wait for a while before making additional requests.

  • Status Code: 456

    Error Message: Quota exceeded

    Action: This error suggests that you have exceeded a usage quota. Review your usage limits and adjust your usage accordingly.

Changelog

All notable changes to this project will be documented in this file.

  • release: 1.7.6 <13/05/2024>

    • Added: Support of Bundle products.

    • Added: Handle special character for the widget conditions.

  • release: 1.7.5 <19/04/2024>

    • Added: docs update for language changes

  • release: 1.7.4 <19/04/2024>

    • Added: norwegian language support add

  • release: 1.7.3 <19/04/2024>

    • Added: verticalbar error fix

  • release: 1.7.2 <19/04/2024>

    • Added: Backticks handling error fix.

  • release: 1.7.1 <19/04/2024>

    • Added: Backticks handling, Mainly used by pagebuilder.

  • release: 1.7.0 <07/03/2024>

    • Added: Support for the translation of Custom Options

  • release: 1.6.8 <18/01/2024>

    • Fix: JsonSerializable functionality disrupted following removal of Zend\Stdlib\JsonSerializable.

  • release: 1.6.7 <18/01/2024>

    • Fix: SecureHtmlRenderer::class not found

  • release: 1.6.6 <20/12/2023>

    • Fix: Compatibility issue with PHP7.3 and Magento 2.3.x version

  • release: 1.6.5 <30/10/2023>

    • Update extension menu sorting

  • release: 1.6.4 <13/10/2023>

    • Fix: Compatibility issue with PHP8.2

    • Fix: Remove unnecessary class dependency

  • release: 1.6.3 <13/10/2023>

    • Fix: Issue with the License key registeration

  • release: 1.6.2 <25/09/2023>

    • fix CMS page translation identifier issue

  • release: 1.6.0 <31/08/2023>

    • Added source language feature

    • fix CLI range bug

  • release: 1.5.3 <22/08/2023>

    • Added feature to store both the source and target languages for the connection.

  • release: 1.5.2 <10/08/2023>

    • Added support for Ukrainian language using DeepL API.

  • release: 1.5.1 <10/08/2023>

    • Change key type “text” to “obscure”

  • release: 1.5.0 <08/08/2023>

    • Add new field to exclude tags with deepL API

    • Fix translation not working properly with all magento editor variable

  • release: 1.4.4 <07/08/2023>

    • Existing CMS page & block translation issue fix

  • release: 1.4.3 <09/06/2023>

    • Fix HTML enity code in attribute values

  • release: 1.4.2 <09/06/2023>

    • Update composer dependencies and PHP version

  • release: 1.4.1 <09/06/2023>

    • Minor code sniffer fixes

  • release: 1.4.0 <09/06/2023>

    • Store Code issue fix for console command.

  • release: 1.3.0 <24/03/2023>

    • Default values add for product, category and page field selection.

  • release: 1.1.0 <15/07/2022>

  • feature: 1 Notification to admin when deepL add new language

  • feature: 2 Add Multi Language Supports.