Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and modify fr_FR.csv #20

Open
AnthonyIp opened this issue Apr 18, 2019 · 6 comments
Open

Add and modify fr_FR.csv #20

AnthonyIp opened this issue Apr 18, 2019 · 6 comments

Comments

@AnthonyIp
Copy link

Hi guys!

I'm new to magento and I'm trying to add few translations for third party module.
My /app was kinda empty because I installed it throught composer aso everything is in the vendor.

My question is how do I override the fr_FR.csv ?

I tried to create the folder /app/i18n/Mageplaza/fr_fr/ and put it ther my fr_FR.csv then

php bin/magento setup:static-content:deploy -f fr_FR;
php bin/magento c:c;
php bin/magento c:f;

but it doesn't change anything....

Any solution ?

Thanks

@valentin-debris
Copy link

@AnthonyIp
If you want to add custom translation on your website (for Front only, not Admin), you can add in a fr_FR.csv located in app\design\frontend\Sm\market\i18n (where Sm\market is yout Theme folder)
Then, flush and it should be good :)

Regards

@AnthonyIp
Copy link
Author

@valentin-debris
I'm using the default theme (luma) which is located in vendor folder.
I don't really know the correct path, I should put on /app folder because mine is pretty empty.

@valentin-debris
Copy link

@AnthonyIp , you should never put or modify codes in the vendor folder, because when you will update a plugin, it will delete everything.
For the luma Theme, you should put your file in "app/design/frontend/Magento/luma/i18n /fr_Fr.csv (if it doesn't exist, you can create it ;)

@AnthonyIp
Copy link
Author

@valentin-debris
I just did what you mentioned and I still have the sentence "You added %1 to your shopping cart." when I added an item to the cart.

In the fr_FR.csv, I have

You added %1 to your shopping cart.,Vous avez ajouté %1 à votre panier.,module,Magento_Checkout

@valentin-debris
Copy link

valentin-debris commented Apr 18, 2019

If the text to replace has more than 2 words, you have to add "" around. Also, maybe it's not the right module, try to remove the "module,Magento_Checkout".
The line should look like :
"You added %1 to your shopping cart.","Vous avez ajouté %1 à votre panier."

also, you have the flush the site everytime you change the file

@legendhorus
Copy link
Contributor

If you follow the instructions of @valentin-debris but the problem is still not resolved, please try add this phrase to vendor/mageplaza/magento-2-french-language-pack/github_contributions.csv
Please note deploy your site after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants