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.

4
  • See for example the Magento Customer module. Commented Apr 20, 2016 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 Commented Apr 21, 2016 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 Commented Apr 24, 2016 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
    Commented Apr 25, 2016 at 8:52

4 Answers 4

1

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
  • great tip making a i18n pack per vendor saved me a lot time were the vendor has a tun of modules
    – SWD
    Commented Oct 24, 2019 at 15:45
0

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

app/design/frontend/{Package}/{themename}/i18n/
1
  • why it should be under the theme folder? I'm translating a module not creating a theme! Commented Apr 21, 2016 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.

2
  • 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. Commented Apr 24, 2016 at 15:08
  • You have to put i18n folder inside your theme and inside i18n folder keep your csv for changes. Commented Apr 25, 2016 at 8:52
-2

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

1
  • 9
    This is a bad answer! As soon as you update the module your translation is lost.
    – Michiel
    Commented Nov 20, 2016 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.