There is no way to create custom Resources with keys that can be translated and later queried by an app?
One approach I found to store app translations that merchants can translate is by adding Metafields on the Shop resource, they will show up on the app in the “Store metadata” section:
It depends on the content you want to translate but what you can do is
Create a Metaobject definition for the content, where each piece of translatable content has a unique key, and is a type “single_line_text_field”. This will need translatable capability and admin PUBLIC_READ_WRITE access.
Then create a metaobject for this definition with your content. You will want this content to be in the default language of the store.
I was aware that Metaobjects can be translated, but we cannot sync our full config objects as Metaobjects to Shopify, so we would have to create separate objects just for translation.
Have you seen apps doing it in this way, or have you done it yourself in this way?
Separating app content, all stored in a metaobject (or metafields if you’ve prefer that) which can then be translated by users.
Then the actual config your app needs can then be in a json metafield/metaobject, it also means you get better control over permissions.
The app config can all be private and content public.
@JordanFinners appreciate the input, good to know this setup works for you.
In our case we have objects that can have a dynamic number of fields, e.g a custom form definition with labels/help text, in that case we would need to create dynamic Metaobjects for each unique configuration of a merchant, and keep it in sync when the fields change.
Not sure if it’s worth the engineering effort, over just using a single metafield and building our own translation UI directly in the app