Gibt es ein Problem, das dringend behoben werden muss?Notfall?Notfallhilfe anfordern →
Blog

Praxisnahe Magento-2-Leitfäden zu Upgrades, Sicherheit, Performance und Migration – geschrieben vom MageBooster-Team.

Magento 2.4.9 store languages: store views, language packs and translations (Lesson 16)

Add a language to Magento 2.4.9: a store view per language, free language packs with Composer, the locale per store view, static content deploy, and a product and home page translated per store view.
Lektion 16MageBooster-Lektionen · Magento 2.4.9

Magento store languages: store views, language packs and translations

In Magento every language is a store view. Our Main Website already has English and German; in this lesson we add Turkish, install free language packs with Composer, set the locale per store view, and translate a product and the home page.

Aktualisiert November 2026Video ca. 6 Min.Niveau Shopbetreiber und Entwickler

A store view per language

Website, store and store view: the website holds customers, prices and the timezone; the store holds the root category; the store view holds the language. One website can have many store views, one per language, that share the catalog and the cart.

FeldOur valueHinweis
StoreMain Website StoreThe store whose catalog the new language shows.
NameTürkçeCustomers see this name in the language switcher, so write it in its own language.
CodetrLowercase letters, numbers and underscores. It is used in URLs and on the command line.
StatusEnabled
Sort Order0Reihenfolge im Umschalter.

Admin: Stores › All Stores › Create Store View, dann Save Store View and confirm the dialog.

Locale Options per store view

Stores › Configuration › General › Locale Options with the scope switcher on the store view. Two things to know:

  • Setzen Sie in production mode the Locale field is locked in the admin. The locale is set on the command line (config:set), together with the static files for that locale.
  • Timezone has no store view scope: it is a website setting, and all store views of one website share it.

Language packs with Composer

Magento’s own magento/language-* packages contain only a language.xml, no translations. The texts come from community packs. The two we installed and tested on Magento 2.4.9 with PHP 8.5:

PaketVersionVeröffentlichtLizenz
splendidinternet/mage2-locale-de-de (Splendid Internet)1.74.317 November 2026OSL-3.0
hidonet/magento2-language-tr_tr (Hidonet)1.0.526 October 2026OSL-3.0

As the Magento file owner, in the Magento folder:

ls vendor/magento/language-de_de

bin/magento maintenance:enable

composer require splendidinternet/mage2-locale-de-de hidonet/magento2-language-tr_tr

for p in splendidinternet/mage2-locale-de-de hidonet/magento2-language-tr_tr; do composer show $p | grep -E '^(name|versions|released|license)'; done

Locale, static files and indexes

The store view tr gets tr_TR (German de got de_DE in Lesson 4):

bin/magento config:set --scope=stores --scope-code=tr general/locale/code tr_TR

Static files for every locale in use. In production mode a locale without deployed static files shows pages without styles:

bin/magento setup:static-content:deploy -f en_US en_GB de_DE tr_TR

A new store view needs its own index rows (products, prices, search):

bin/magento indexer:reindex

bin/magento maintenance:disable && bin/magento cache:flush

Then as root, because OPcache on our server does not check files for changes (Lesson 1):

systemctl reload php8.5-fpm

Product names per store view

Catalog › Products, open the product, switch Scope to the store view. Untick Use Default Value on each field you translate: here Product Name (MageBooster Seyahat Kupası) and, under Search Engine Optimization, URL Key (magebooster-seyahat-kupasi). Every untouched field keeps the default value. Category names, attribute labels and option labels work the same way.

A home page per store view

CMS pages are assigned to store views. Content › Pages › Add New Page: Page Title Ana Sayfa, Content Heading, URL Key ana-sayfa, and under Page in Websites only the Türkçe store view. Then Stores › Configuration › General › Web › Default Pages, scope Türkçe: CMS Home Page = Ana Sayfa. CMS blocks work the same way: one copy per language.

Saved settings invalidate the configuration cache:

bin/magento cache:flush

The language switcher

Luma shows the language switcher in the header as soon as a store has more than one store view. On our test store: English (Default Store View), German with menus and buttons from the German pack, and Türkçe with its own home page and the product under its Turkish name and URL.

OptionAddressWo
One domain, language in a cookiehttps://www.example.com/Default (this lesson)
Store-Code in der URLhttps://www.example.com/tr/Web › Url Options › Add Store Code to Urls
One domain per languagehttps://www.example.com.tr/Lesson 11 (multisite)

Downloads

languages-commands.shDownload

#!/bin/bash
# MageBooster Lesson 16: store languages in Magento 2.4.9. Run the parts one by one on the server.
# First create the store view in the admin: Stores > All Stores > Create Store View (here: Türkçe, code tr).

# 1) As the Magento file owner, in the Magento folder (production mode)
cd /var/www/magento
ls vendor/magento/language-de_de    # Magento's own language package: no CSV inside
bin/magento maintenance:enable
composer require splendidinternet/mage2-locale-de-de hidonet/magento2-language-tr_tr
for p in splendidinternet/mage2-locale-de-de hidonet/magento2-language-tr_tr; do composer show $p | grep -E '^(name|versions|released|license)'; done

# 2) The language of the store view "tr" (German "de" got de_DE in Lesson 4)
bin/magento config:set --scope=stores --scope-code=tr general/locale/code tr_TR

# 3) Static files for every locale your store views and admin users use, then the indexes
bin/magento setup:static-content:deploy -f en_US en_GB de_DE tr_TR
bin/magento indexer:reindex
bin/magento maintenance:disable && bin/magento cache:flush

# 4) As root: OPcache without timestamp checks needs a PHP-FPM reload (your PHP version)
systemctl reload php8.5-fpm

# 5) After the admin changes (product name, CMS page, Default Pages), as the Magento file owner
bin/magento cache:flush
languages-config.shDownload

#!/bin/bash
# MageBooster Lesson 16: store view settings from the command line. Use your own store view codes.
cd /var/www/magento
sudo -u magento bin/magento config:show --scope=stores --scope-code=tr general/locale/code
sudo -u magento bin/magento config:set --scope=stores --scope-code=de general/locale/code de_DE
sudo -u magento bin/magento config:set --scope=stores --scope-code=tr general/locale/code tr_TR
# the language in the address: https://your-domain/tr/ (all store views)
sudo -u magento bin/magento config:set web/url/use_store 1
sudo -u magento bin/magento cache:flush

Fehlerbehebung

SymptomUrsache und Lösung
The new store view shows pages without stylesProduction mode: its locale has no static files. Run setup:static-content:deploy with that locale, flush the cache.
Buttons stay in English after the installThe store view locale is still en_US (config:show --scope=stores --scope-code=...), or the cache was not flushed / PHP-FPM not reloaded.
The Locale field is greyed outProduction mode locks it. Use bin/magento config:set --scope=stores.
No products or empty search in the new store viewFühren Sie bin/magento indexer:reindex after creating the store view.
No language switcher on the storefrontThe store needs at least two active store views; one domain per language (Lesson 11) hides it.
A word in the pack is wrongOverride it in your theme: app/design/frontend/Vendor/theme/i18n/tr_TR.csv, then deploy static files.

Nächste Lektion

Lesson 17: Locale and currencies: euro, pound and Turkish lira.

Opening your store in more languages?We set up multi-language Magento stores.

▶ Alle MageBooster-Lektionen auf YouTube: alle Lektionen der Reihe nach · Kanal abonnieren

Installationsanleitungen: Magento 2.4.9 unter Ubuntu Mage-OS Hyvä
Haben Sie auf dieser Seite einen Fehler entdeckt? Sagen Sie uns Bescheid, wir korrigieren ihn umgehend.

Kostenloser Shop-Audit

Senden Sie uns die Daten Ihres Shops. Wir prüfen Performance, Sicherheit und Extensions und melden uns innerhalb von 3 Werktagen mit drei schnell umsetzbaren Verbesserungen.

Sprechen wir

Angebot anfordern

Erzählen Sie uns von Ihrem Shop – wir antworten innerhalb eines Werktags. Lieber chatten? Schreiben Sie uns auf WhatsApp

MageBooster UnoPim-Demo buchen Sehen Sie UnoPim live mit Produkten wie Ihren. Ein neues PIM oder der Umstieg von Akeneo: Wir antworten mit Plan, Zeitplan und Angebot.
✓ Offizieller UnoPim-Partner✓ KI-Agent für Ihr Team eingerichtet✓ Mit Magento verbunden
MageBooster Hyvä-Projekt starten Neu oder auf Basis Ihres bestehenden Shops. Wir antworten mit Projektplan, Zeitplan und Angebot.
✓ Design und Struktur von uns✓ Hyvä-optimierter Server✓ Bonus-Module inklusive

MageBooster

Wir melden uns bei Ihnen

Hinterlassen Sie Ihre Daten und die Adresse Ihres Shops. Wir sehen uns zuerst Ihren Shop an und melden uns innerhalb eines Werktags, per Telefon, WhatsApp oder E-Mail, ganz wie Sie möchten.

Partner werden