Magento localisation commands

Install magento, and run these commands from your magento root directory. If you can see directory vendor, app, and bin, you are in correct directory. Make sure you are running these commands with user with write permissions to magento.

composer config repositories.atconnect composer https://connect20.aveo-trade.cz

This command tells your composer to add a AT repository. If you will not add the repository, composer will not find the extension.

composer require atconnect/magento2-lang-exporter:*

This command tells your composer to add a AT magento lang exporter package. This will add further commands to your magento installation. After successfull installation, you can see new i18n commands in magento.

You can check it with command:

php bin/magento list

You should see there new i18n commands: for example i18n:export-for-translators.

Additional documentation

Additional documentation can be obtained by running help command in your magento for specific command.

php bin/magento help i18n:export-for-translators
php bin/magento help i18n:fetch-google-translations
php bin/magento help i18n:fetch-azure-translations
php bin/magento help i18n:import-translations
php bin/magento i18n:export-for-translators [YOUR_EMAIL] [YOUR_PROJECT] [DEFAULT_LANG]

This command allows you to export your product names, descriptions, meta tags and other to the AT Translate system.

If you provide email, you can bind it with your account at AT Translate. If you do not provide email, the default email address from your store will be used.

You can name your project by supplying second optional parameter. If you do not provide name of your project, name of your project will be evaluated from the web address of your eshop.

You can choose which store localisation is your primary language by providing third optional parameter.

php bin/magento i18n:fetch-google-translations [YOUR_EMAIL] [YOUR_PROJECT] [TO_LANG]

This command allows you to fetch translations from Google translation api service.

In order the command to be successfull, you need to successfully map your account using the email address and project. Default values are obtained as described above.

You can choose the language to which the translation will be processed. If you do not provide language, it will fetch translations to all languages in which your magento is localised.

You can use this translations for your manual translation, or to help your translators with the job.

php bin/magento i18n:fetch-azure-translations [YOUR_EMAIL] [YOUR_PROJECT] [TO_LANG]

This command allows you to fetch translations from Azure translation api service.

In order the command to be successfull, you need to successfully map your account using the email address and project. Default values are obtained as described above.

You can choose the language to which the translation will be processed. If you do not provide language, it will fetch translations to all languages in which your magento is localised.

You can use this translations for your manual translation, or to help your translators with the job.

php bin/magento i18n:import-translations [YOUR_EMAIL] [YOUR_PROJECT] [FOR_LANG] [DEFAULT_SERVICE]

This command allows you to import all translated text back to your eshop.

In order the command to be successfull, you need to successfully map your account using the email address and project. Default values are obtained as described above.

You can choose the language which you are going to import.

Default service is service from which translations are taken if they are not yet verified by human translator. Valid values are 'Azure' or 'Google'. We recommend azure service because it seems to translate phrases better.