The plugin currently syncs the Shopify products data with the stores default language. Shopify can also store translations for the products fields. Is there a way we can sync the products with translations for the languages that are defined in Craft on site level?
In BulkOperation and the Shopify Admin API it should be possible to fetch translated values like this:
mutation BulkFetchProductsWithMultiLangTranslations {
bulkOperationRunQuery(
query: """
{
products(first: 250) {
edges {
node {
id
handle
title
descriptionHtml
translations(locale: \"en\") {
key
value
}
translations_fr: translations(locale: \"fr\") {
key
value
}
translations_de: translations(locale: \"de\") {
key
value
}
}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
The only problem I see here, is that we naturally don't have a mapping between Shopify locales and Crafts sites locales. So one solution could be to extend the settings to add a config, which translations/locales the sync should consider and to which sites the translations are mapped.
The plugin currently syncs the Shopify products data with the stores default language. Shopify can also store translations for the products fields. Is there a way we can sync the products with translations for the languages that are defined in Craft on site level?
In BulkOperation and the Shopify Admin API it should be possible to fetch translated values like this:
The only problem I see here, is that we naturally don't have a mapping between Shopify locales and Crafts sites locales. So one solution could be to extend the settings to add a config, which translations/locales the sync should consider and to which sites the translations are mapped.