Override i18n language pack
Syntax#
-
<Vendor Namespace> - Here namespace of the vendor custom theme or inbuilt theme namespace I.E.
Magento/Luma
Hereluma
isvendor namespace
-
<language package directory> - Here language package directory like
en_us
ornl_nl
oren_gb
-
<language package description> - Here add description of the package like
English Us Package
-
<language package code> - Here code of the language package I.E
en_US
ornl_NL
oren_GB
Remarks#
After create above files and directories language_package_code.csv
will goes to Vendor Namespace
directory
Example
/app/i18n/luma/en_us/en_US.csv
or
/app/i18n/luma/en_gb/en_GB.csv
or
/app/i18n/luma/nl_NL/nl_NL.csv
Syntax example of override i18n language package
/app/i18n/<Vendor Namespace>/<language package directory>/composer.json
{
"name": "<vendor namespance>/<language package directory>",
"description": "<language package description>",
"version": "100.0.1",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/framework": "100.0.*"
},
"type": "magento2-language",
"autoload": {
"files": [
"registration.php"
]
}
}
/app/i18n/<Vendor Namespace>/<language pack>/language.xml
<?xml version="1.0"?>
<language xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
<code><language package code></code>
<vendor><vendor namespace></vendor>
<package><language package directory></package>
</language>
/app/i18n/<Vendor Namespace>/<language pack>/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
'<vendor namespance>_<language package directory>',
__DIR__
);