How to add a Magento 2 Language pack?
To change the language of hard-coded text appearing on your store pages you can simply alter the Locale of the Store View. However, it won’t help you with the translation of each word on a page. The text includes only:
- the navigation titles;
- links like ‘My Cart’, ‘My Account’, etc.
Besides, you can use the Inline Translation to translate any of the elements, as well as other text content, in case they haven’t been changed.
What is Magento 2 Language pack?
A language pack contains translation files for different text content on your Magento 2 website. E.g.: translation files for standard phrases and email templates, full translations for Community and Enterprise editions.
Magento 2 Language pack download
To download a free or buy a paid language pack you can switch to the official Marketplace. Find a necessary extension under the Content & Customization category and proceed to the next settings.
Add the Language pack via the Admin Panel
Step 1: Install the Language pack on Magento 2
Install the language pack you have chosen from Component Manager.
Step 2: Create a Store View for the language you need
- Go to the Admin Panel> Stores> Settings> All Stores:
- Click the ‘Create Store View’ button and then make the next settings:
- Save the Store View.
Step 3: Change the Locale of the Store View
- Go to the Admin Panel> Stores> Configuration> General> Locale Options:
- Choose the language you need, clear the ‘Use Website’ checkbox after the Locale field and click the ‘Save Config’ button.
Add the Language pack via the Command line
- Log in to the Magento server as a system file owner;
- Navigate to your Magento 2 root directory;
- Use the next command:
composer require company/language-pack-de-de
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy de_DE