cancel
Showing results for 
Search instead for 
Did you mean: 

i18n translation

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

i18n translation

Hello

 

I've installed Magento 2 and imported all translation from crowdin....

Everthing is perfect .... all the pages are correctly in my own language.

 

The issue comes when I click on a category in the frontend menu .... here is the report:

 

 

a:4:{i:0;s:37:"File "/i18n/it_IT.csv" does not exist";i:1;s:9567:"#0 /var/www/websitename/vendor/magento/framework/File/Csv.php(119): Magento\Framework\File\Csv->getData('/i18n/it_IT.csv')
#1 /var/www/websitename/vendor/magento/framework/Translate.php(378): Magento\Framework\File\Csv->getDataPairs('/i18n/it_IT.csv')
#2 /var/www/websitename/vendor/magento/framework/Translate.php(272): Magento\Framework\Translate->_getFileData('/i18n/it_IT.csv')
#3 /var/www/websitename/vendor/magento/framework/Translate.php(258): Magento\Framework\Translate->loadModuleTranslationByModulesList(Array)
#4 /var/www/websitename/vendor/magento/framework/Translate.php(179): Magento\Framework\Translate->_loadModuleTranslation()
#5 /var/www/websitename/vendor/magento/framework/App/Area.php(240): Magento\Framework\Translate->loadData(NULL, false)
#6 /var/www/websitename/vendor/magento/framework/App/Area.php(211): Magento\Framework\App\Area->_initTranslate()
#7 /var/www/websitename/vendor/magento/framework/App/Area.php(138): Magento\Framework\App\Area->_loadPart('translate')
#8 /var/www/websitename/vendor/magento/framework/View/DesignLoader.php(55): Magento\Framework\App\Area->load('translate')
#9 /var/www/websitename/vendor/magento/framework/App/Action/Plugin/Design.php(38): Magento\Framework\View\DesignLoader->load()
#10 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Framework\App\Action\Forward\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#11 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#12 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\Action\Forward\Interceptor), Array, 'customer-app-ac...')
#13 /var/www/websitename/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#14 [internal function]: Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Framework\App\Action\Forward\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#15 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#16 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\Action\Forward\Interceptor), Array, 'storeCheck')
#17 /var/www/websitename/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#18 [internal function]: Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Framework\App\Action\Forward\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#19 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#20 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\Action\Forward\Interceptor), Array, 'tax-app-action-...')
#21 /var/www/websitename/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#22 [internal function]: Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Framework\App\Action\Forward\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#23 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#24 /var/www/websitename/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\Action\Forward\Interceptor), Array, 'weee-app-action...')
#25 /var/www/websitename/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\App\Action\Forward\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#26 [internal function]: Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Framework\App\Action\Forward\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#27 /var/www/websitename/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#28 /var/www/websitename/var/generation/Magento/Framework/App/Action/Forward/Interceptor.php(26): Magento\Framework\App\Action\Forward\Interceptor->___callPlugins('dispatch', Array, Array)
#29 /var/www/websitename/vendor/magento/framework/App/FrontController.php(55): Magento\Framework\App\Action\Forward\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#30 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#31 /var/www/websitename/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#32 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#33 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
#34 /var/www/websitename/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(89): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#35 [internal function]: Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#36 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#37 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#38 /var/www/websitename/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#39 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#40 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#41 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#42 /var/www/websitename/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#43 [internal function]: Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#44 /var/www/websitename/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#45 /var/www/websitename/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#46 /var/www/websitename/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#47 [internal function]: Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#48 /var/www/websitename/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#49 /var/www/websitename/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#50 /var/www/websitename/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#51 /var/www/websitename/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#52 /var/www/websitename/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#53 {main}";s:3:"url";s:14:"/categoryname.html";s:11:"script_name";s:10:"/index.php";}

 

 

I have checked the folder i18n anf the file it_IT.csv and they do exist....

 

what could cause the above issue?

 

thanks for your precious help

 

Alex

2 REPLIES 2

Re: i18n translation

As you can see in the \Magento\Framework\File\Csv::getData() implementation, it treats the "/i18n/it_IT.csv" string as the full file path, not a relative, so it can not find it.

 

https://github.com/magento/magento2/blob/bd1c47b/lib/internal/Magento/Framework/File/Csv.php#L86-L10...

Re: i18n translation

Hello Dmitry,

 

thank you for your prompt reply.... I'm not very familiar with PHP codes

In this case what u suggest me to do.... Can I change some line of Csv.php? what I should change?

I must open a ticket with Magento support as well?

 

thank you

 

Alex