2

Is it possible to translate every lines from any modules in one file?

I pulled bin/magento i18n:collect-phrases -o directly in root and got all the lines with their locations ex: ,module,Magento_OfflineShipping

Ideally, I would pull the lines I need, create a separate file and add translations I need. We already have a dictionary in /app/i18n/fr_ca but adding lines to this file does not seem to work.

Thanks

0

1 Answer 1

3

In this case, best way to translate terms from storefront theme. For example, theme name in your project is "ExampleCorp_orange" then go to

app/design/frontend/ExampleCorp/orange/i18n/fr_ca.csv

And add those terms in above file along with translation. Like this:

"Add to Cart", "Ajouter au chariot"
"Add to Compare", "ajouter pour comparer"
"Add to Wish List", "Ajouter à la liste de souhaits"

then, Run the deploy command to get localization changes:

bin/magento setup:static-content:deploy

Happy coding!

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.