Language Module

So I kinda try to understand it's purpose, but I fail to do that. I made a sample module.

app/i18n/Lang/en_KR

language.xml

<?xml version="1.0"?>
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
    <code>en_KR</code>
    <vendor>lang</vendor>
    <package>en_KR</package>
</language>

registration.php

ComponentRegistrar::register(ComponentRegistrar::LANGUAGE, 'lang_en_kr', __DIR__);

composer.json

{
  "name": "lang/language-en_kr",
  "description": "Eng to Korea",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "config": {
    "sort-packages": true
  },
  "require": {
    "magento/framework": "102.0.*"
  },
  "type": "magento2-language",
  "autoload": {
    "files": [
      "registration.php"
    ]
  },
  "version": "100.3.3"
}

And what now ?

As I went to the Admin Panel of my StoreView

System -> Configuration -> Main Webiste -> My store view -> General

And right now what I would expect is that my new language (en_KR) would be existing, in the locale, but it does not, am I missing something, and the purpose of the packs is kinda different ??

When I made a record in core_config_data to my store and set the value of:

|      path          | value|
-----------------------------
|general/locale/code | en_CR|

and now I added a file in any module under

VENDOR/MODULE/i18n/en_CR.csv And the value was populated.

What's the purpose of this magic thing has anyone idea?? Am I'm miss understanding it's purpose?



from Active questions tagged magento-enterprise - Magento Stack Exchange

Click link to view all answer https://magento.stackexchange.com/questions/311802/language-module