0

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?

1 Answer 1

0

Please look at below link

https://mage2.pro/t/topic/270

its very useful to create language pack

1
  • I think you did not understand my question, I did not ask for a tutorial as my lang is set or at least it's listed by the ComponentRegistrar, and this tutorial leads to installing some kind of external extension Commented May 1, 2020 at 14:02

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.