I am trying to create a new store view for the Tamil Language, but the language does not get listed while choosing the language from admin.
short description of what I have done
1) I have successfully created Tamil Store View. Please refer the screenshot for your easy reference.
2) Next, I am trying to add Tamil Language Package
2.1 collect phrases
create the folder /var/www/html/magento2/app/i18n/tamil/tn_tn/
after that run the below command and get a success message
php bin/magento i18n:collect-phrases -o "/var/www/html/magento2/app/i18n/tamil/tn_tn/dictionary.csv" -m "/var/www/html/magento2/"
2.2 composer.json
{
"name": "tamil/tn"
,"type": "magento2-language"
,"description": "Tamil language"
,"authors": [{
"name": "Bilal Usean",
"email": "[email protected]",
"role": "Developer"
}]
,"extra": {"map": [["*", "tamil/tn_tn"]]}
}
2.3 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>tn_TN</code>
<vendor>tamil</vendor>
<package>tn_tn</package>
</language>
2.4 registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
'tamil_tn_tn',
__DIR__
);
2.5 Translate
dictionary.csv contains 8000+ rows of phrases for the sample I have taken one (open in gedit)
"We found other products you might like!","We found other products you might like!",module,Magento_Catalog
tn_TN.csv I have translated above particular line (contains one row)(open in gedit)
"We found other products you might like!","நீங்கள் விரும்பக்கூடிய மற்ற பொருட்கள் காணப்படும் !",module,Magento_Catalog
2.6 Language pack
run the below command for creating the language pack and get a success message Successfully saved tn_TN language package
.
php bin/magento i18n:pack -d app/i18n/tamil/tn_tn/tn_TN.csv tn_tn tn_TN
It will create directory (tn_tn pack)
<magento-root>/tn_tn/vendor/magento/module-catalog/i18n/tn_TN.csv
someone noted it, collect phrases and lang pack commands are different from the official doc, please refer this link for why am I using like this way.
Overall structure of my language package
After that clear cache, run setup:upgrade, indexer:reindex but I can't found my Tamil language pack in newly created Tamil store view locale options.
I would like to mention one more, I have researched about existing lang pack /var/www/html/magento2/vendor/magento/language-de_de
(composer.json, language.xml, registration.php) but unable to find the exact name of the locale like listed in admin(German (Germany)). So I confused any step I missed to create locale.
why Tamil language package does not get installed?