For i18n
You can make it like this
Make folder named with i18n
in app
folder
Make sub folder same name as your theme like custom
in i18n
folder
Make language pack folder(s) in i18n -> custom
folder like en_us
or en_gb
Now your folder structure will like this app/i18n/custom/en_us/
Now in this your language package folder make below files, all files will be in this folder structure app/i18n/custom/en_us/
app/i18n/custom/en_us/composer.json
{
"name": "custom/en_us",
"description": "English (US) language",
"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/custom/en_us/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_US</code>
<vendor>custom</vendor>
<package>en_us</package>
</language>
app/i18n/custom/en_us/registration.php
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
'custom_en_us',
__DIR__
);
After this put your en_US.csv in your language pack folder
- app/i18n/custom/en_us/en_US.csv
After than run this following commands
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento cache:clean
Hope this will helps you