3

I have successfully created a language package at /app/i18n/vendor/ja_jp and applied it to the storefront.

But the new language package is not appeared in the admin's account setting. How can I create a new language package for the admin interface?

enter image description here

0

then create a module /app/code/vendor/ja_jp:

file /app/code/vendor/ja_jp/registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'vendor_ja_jp',
__DIR__

);

file /app/code/vendor/ja_jp/etc/module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="vendor_ja_jp" setup_version="1.0.0"/>

and file /app/code/vendor/ja_jp/etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\Locale\Config">
    <arguments>
        <argument name="data" xsi:type="array">
            <item name="allowedLocales" xsi:type="array">
                <item name="ja_jp" xsi:type="string">ja_JP</item>
            </item>             
        </argument>
    </arguments>
</type>

2
  • are you sure its works for you? Jul 15 '17 at 9:56
  • Sure, this works for any locale in the directory vendor/magento/zendframework1/library/Zend/Locale/Data . Working example: github.com/karliuka/m2.LocaleRuUA
    – Vitalii
    Jul 15 '17 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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