0

I am using Magento 2.0.4 and want to provide translation dictionaries to vendor modules such vendor/magento/module-customer

I have successfully collected the phrases of this module, but don't know where I should put the .csv

Note: I am not going to install a language package, I'm translating each module in isolation.

  • See for example the Magento Customer module. – Steve Johnson Apr 20 '16 at 20:21
  • @SteveJohnson I have placed translations inside app/code/Magento/Customer/i18n/ but it doesn't load! Moreover, I didn't find this app/code/Magento folder and its subfolders and created them myself – Yasser Rabee Apr 21 '16 at 14:19
  • In the Magento 2 GitHub (and if you clone GitHub), you'll see app/code but if you installed via archive or Composer, you'll see modules under vendor/<vendorname>. You should put your .csv file under the appropriate directory, which in your case, sounds like vendor – Steve Johnson Apr 24 '16 at 15:10
  • According to our docs, translations for this module should go to: vendor/magento/module-customer/i18n/. What is the name of your .csv file? It must use the correct language code in the naming, to be applied correctly. – Alex Apr 25 '16 at 8:52
0

You have to keep .csv file inside your theme i18n folder.

app/design/frontend/{Package}/{themename}/i18n/
  • why it should be under the theme folder? I'm translating a module not creating a theme! – Yasser Rabee Apr 21 '16 at 14:22
0

You have to keep .csv file inside your theme i18n folder.

app/design/frontend/{Package}/{themename}/i18n/

Remove var folder and check.

  • I am pretty sure these answers are incorrect but am checking. I believe that a module translation file goes with the module. We'll post an update ASAP. – Steve Johnson Apr 24 '16 at 15:08
  • You have to put i18n folder inside your theme and inside i18n folder keep your csv for changes. – Rakesh Jesadiya Apr 25 '16 at 8:52
0

I had the same issue.. After hours of investigating i found out that this is the closest to a solution that accually works. It's translates per vendor, so then I don't have to have all phrases in one large file.

Create:

/app/i18n/vendor/de_ch/de_CH.csv
/app/i18n/vendor/de_ch/composer.json
/app/i18n/vendor/de_ch/language.xml
/app/i18n/vendor/de_ch/registration.php

See: https://stackoverflow.com/questions/34067460/how-to-install-a-language-pack-in-magento-2

-1

From @steve-johnson comment:

In the Magento 2 GitHub (and if you clone GitHub), you'll see app/code but if you installed via archive or Composer, you'll see modules under vendor/. You should put your .csv file under the appropriate directory, which in your case, sounds like vendor

  • 6
    This is a bad answer! As soon as you update the module your translation is lost. – Michiel Nov 20 '16 at 10:39

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.