3

So people are translating Magento 2.

How can I use the current translation from there in my project?

I can download a source.csv - but won't I need one file per module?

1

3 Answers 3

3

Maybe using this command from your project root:

bin/magento i18n:pack --mode=replace -d path/to/your/file/source.csv . de_DE

After that, use this command:

bin/magento setup:static-content:deploy de_DE

All the translations will be applied.

3
  • PHP Parse error: syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING), expecting ';' in /home/foo/bar/workspace/example.de/setup/src/Magento/Setup/Module/I18n/Dictionary/Phrase.php(278) : eval()'d code on line 1
    – Alex
    Feb 8, 2016 at 8:33
  • Might be an issue with the PHP7 i am using (community.magento.com/t5/Technical-Issues/…)
    – Alex
    Feb 8, 2016 at 8:35
  • I was able to use the workaround at github.com/magento/magento2/issues/3303 - but it looks like the source.csv (for de_DE) is already rubbish.
    – Alex
    Feb 8, 2016 at 8:44
0

You can download the language pack from the magento marketplace (free).

Then you just have to follow the installation instructions from the README.md

Installation

  • Alle Dateien nach /app/i18n/splendid/de_DE/ kopieren

Aus dem Magento-Root-Verzeichnis folgende Befehle aufrufen:

rm pub/static/frontend/Magento/luma/de_DE/js-translation.json
php bin/magento setup:static-content:deploy de_DE
php bin/magento setup:upgrade
rm -rf var/di
php bin/magento setup:di:compile
-1

Hello Good afternoon my friend

Did the procedures that you said just upgrading to the language pt_BR

But see in the image that the error is displayed

"Requested languages: pt_BR File "/i18n/pt_BR.csv" does not exist> "

You have some information to correct this occurrence, because I intend to use this translation pack

http://pasteboard.co/1eIoZv6N.png

http://pasteboard.co/1eIsgplB.png

The strange thing is that when updating the page we see that was applied due translation

http://pasteboard.co/1eIMGoxK.png

2
  • Mmm... I'm learning too. I guess that this is happening because we're trying to use an independent file and not a language module. I'm using my own module github.com/barbanet/magento2-language-es_ar I think that you'll need to create the language module and then apply the downloaded file.
    – Barbanet
    Feb 1, 2016 at 20:58
  • Marcio, this is not an answer, please delete.
    – Alex
    Feb 8, 2016 at 8:45

Your Answer

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

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