I need to get the untranslated value of the product type in the liquid code. Before translating our store in other languages, we were using the product type as a condition of some of the features some of our product pages would display, which was working fine and would prevent us from relying too much on tags and metafields, which would clutter the interface at some point.
Is there a way to get the original, default value of a product field ? In the API, translations are their very own things, and while I get that in the theme you want a translated content by default, it seems very unpractical to me that we don’t have a filter or another mean to get the base value.
Thank you for your answer. It could be a nice solution when you have a JS-first storefront, but ours is mainly liquid-generated and we want to keep it this way for now. Fetching the product informations one more time in the browser should not have to be done just to be able to access base values…
I have had the same problem when using an enum metafield (“single line text” with “limit to preset choices”) since the translations aren’t limited to preset choices.
The best alternative (although i didn’t implement it myself since its a bit overkill for my use case) is to instead use a metafield of type “metaobject reference”. Since then you can limit the choice for all languages (since metaobject references aren’t translatable). And the actual translations of the labels are easier to find since it’s just on the metaobjects.
Though, again, it might be a bit overkill, and is probably just easier to tell your team to not translate that field.