Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Add translations for Shopify functions

Add translations for Shopify functions

BenGolan
Shopify Partner
1 0 0

Hello,
I'm working on cart-checkout-validation extension function.

I want to give the user the ability to change the text of the errors.

 

Replies 4 (4)

Liam
Community Manager
3108 344 904

Hi Ben,

 

Is the error message one that your app is producing or one that is generated by Shopify?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

R3dNag
Shopify Partner
7 0 3

Hi

 

It would be interesting to hear about both cases!

 

I have the situation currently, that my validation message is defined by the function itself.

Currently I simply use the locales folder with the translations in there (and importing them with a custom translation function). But I was wondering if I could somehow place the translation in the shopify UI, so the merchant can translate it, without requiring me to update the translations.

 

Thanks for any hints or references to examples / documentation about that.

 

The only information about "translations in functions" I found: https://shopify.dev/docs/apps/functions/localization#providing-translated-content

brumelo
Shopify Partner
3 0 0

Hi @R3dNag did you find a solution to that scenario relying on Shopify api and not using your custom function (like we did)?

Thank you!

R3dNag
Shopify Partner
7 0 3

Nope...