I just installed this language pack:


The way I installed it was like this: 1. create folder via ftp in app/i18n/imaginaerum/fr_fr/ unzip file here 2. create store view and change language to french (france).I used language code "fr"

it works.

I'm curious how Magento knew to use that folder as a language pack. It seems to me I did nothing to really connect the language choice with that pack. And while it is doing exactly what I want I don't know how/why so I am kind of curious as I am just starting to learn how magento works.

  • for all languge there is specific code. for example : fr_fr and you select french from admin. so magento will check if languge pack is available it will use it or use magento default text
    – Kul
    Commented Jan 17, 2017 at 15:55
  • @Kul How did Magento know to look in that folder for the code though? Is there a specific folder that magento looks for language packs?
    – Sackling
    Commented Jan 17, 2017 at 16:02

1 Answer 1


If you look into app/i18n/Magento you can find different language packages. Every package to be recognized by Magento must have registration.php file.

We have 2 cases to read this file.

1. Install via composer.

To be executed this file must be added to composer.json in the package directory.

"autoload": {
    "files": [

2. Not installed via composer

Magento looks for this file in predefined dirs.




$pathList[] = dirname(__DIR__) . '/i18n/*/*/registration.php';

That's it.

Same mechanism exists for modules and themes which allows to be placed either under app or vendor folders.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.