Is there a problem that needs an urgent fix?Urgent fix?Get emergency help →
Blog

Practical Magento 2 guides on upgrades, security, speed and migration, written by the 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.
Lesson 16MageBooster Lessons · 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.

Updated November 2026Video about 6 minLevel Store owners and developers

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.

FieldOur valueNote
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 Order0Order in the switcher.

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

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

PackageVersionReleasedLicence
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.

OptionAddressWhere
One domain, language in a cookiehttps://www.example.com/Default (this lesson)
Store code in the 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

Troubleshooting

SymptomCause and fix
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 viewRun 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.

Next lesson

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

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

▶ Watch every MageBooster lesson on YouTube: all lessons in order · subscribe to the channel

Installation guides: Magento 2.4.9 on Ubuntu Mage-OS Hyvä
Spotted a mistake on this page? Tell us and we will fix it right away.

Free Site Audit

Send your store details. We check speed, security and extensions, then reply with three quick wins within 3 working days.

Let's talk

Get a quote

Tell us about your store and we’ll reply within one working day. Prefer to chat? Say hello from WhatsApp

MageBooster Book a UnoPim demo See UnoPim live with products like yours. A new PIM or a move from Akeneo: we reply with a plan, a timeline and a quote.
✓ Official UnoPim partner✓ AI agent set up for your team✓ Connected to Magento
MageBooster Start your Hyvä project From scratch or from your current store. We reply with a project plan, a timeline and a quote.
✓ Design and structure by us✓ Hyvä-optimised server✓ Bonus modules included

MageBooster

Let us get in touch with you

Leave your details and your store address. We look at your store first and contact you within one business day, by phone, WhatsApp or email, whichever you prefer.

Partner with us