Acil müdahale gerektiren bir sorununuz mu var?Acil müdahale mi?Acil yardım alın →
Blog

MageBooster ekibinden upgrade, güvenlik, hız ve taşıma üzerine pratik Magento 2 rehberleri.

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.
Ders 16MageBooster Dersleri · 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.

Güncelleme November 2026Video yaklaşık 6 dkSeviye Mağaza sahipleri ve geliştiriciler

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.

AlanOur valueNot
StoreMain Website StoreThe store whose catalog the new language shows.
AdTü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 Order0Dil seçicideki sıra.

Admin: Stores › All Stores › Create Store View, ardından 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:

  • Sunucunuzdaki 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:

PaketSürümYayın tarihiLisans
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.

OptionAddressNerede
One domain, language in a cookiehttps://www.example.com/Default (this lesson)
Adreste mağaza koduhttps://www.example.com/tr/Web › Url Options › Add Store Code to Urls
One domain per languagehttps://www.example.com.tr/Lesson 11 (multisite)

İndirmeler

languages-commands.shİndir

#!/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.shİndir

#!/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

Sorun giderme

BelirtiNeden ve çözüm
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 viewŞu komutları çalıştırın: 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.

Sonraki ders

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

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

▶ Tüm MageBooster derslerini YouTube’da izleyin: sırayla tüm dersler · kanala abone olun

Bu sayfada bir hata mı gördünüz? Bize bildirin, hemen düzeltelim.

Ücretsiz Site Analizi

Mağaza bilgilerinizi gönderin. Hız, güvenlik ve eklentileri inceleyip 3 iş günü içinde hemen uygulayabileceğiniz üç iyileştirme önerisiyle size dönelim.

Konuşalım

Teklif alın

Mağazanızdan bahsedin, bir iş günü içinde size dönelim. Sohbet etmeyi mi tercih edersiniz? WhatsApp'tan yazın

MageBooster UnoPim demosu talep edin UnoPim’i sizinkine benzer ürünlerle canlı görün. Yeni bir PIM ya da Akeneo’dan geçiş: plan, zaman çizelgesi ve teklifle dönüyoruz.
✓ Resmi UnoPim partneri✓ Ekibiniz için yapay zeka asistanı✓ Magento’ya bağlı
MageBooster Hyvä projenizi başlatın Sıfırdan ya da mevcut mağazanızdan. Proje planı, zaman çizelgesi ve teklifle dönüyoruz.
✓ Tasarım ve kurgu bizden✓ Hyvä’ya optimize sunucu✓ Bonus modüller dahil

MageBooster

Size ulaşalım

Bilgilerinizi ve mağaza adresinizi bırakın. Önce mağazanıza bakıyoruz, ardından bir iş günü içinde tercih ettiğiniz yoldan, telefon, WhatsApp ya da e-posta ile size ulaşıyoruz.

Partnerimiz olun