translating components
I cannot find a way to translate the SfAddToCart button's label. How can I do that?
9 Replies
Hey @bvlint are you using SFUI 1 or 2?
All translation is happening using i18n module
Internationalization | Vue Storefront 2
Vue Storefront 2 documentation
@bvlint
take a look at this:
https://github.com/vuestorefront-community/prestashop/blob/a0be4c55ecac0b0617f171b3c391b7457c4cce06/packages/theme/pages/Product.vue#L94
GitHub
prestashop/Product.vue at a0be4c55ecac0b0617f171b3c391b7457c4cce06 ...
Convert your traditional PrestaShop website into a fast, mobile friendly and modern website. - prestashop/Product.vue at a0be4c55ecac0b0617f171b3c391b7457c4cce06 · vuestorefront-community/prestashop
I am doing every translation in that module but I can't find "Add to cart" anywhere sadly
I am using SFUI2 I think, its a year old project that I abandoned for half a year
Yep, you need to import
t
from the i18n package and use it inside the template
Nope, that would be SFUI1 for sure 🙂
Do you have a lang directory with the translation keys?yep, and made a new one which im using "hu.js"
thanks that worked! ❤️
welcome ❤️
can I mark this post solved somehow or should I just leave it be?
I will mark it thanks! I think when you click right click on the message, you can click Apps -> Mark as solution also edit tag to Solved 🙂