We're trying to programatically migrate a blog from a different platform into hubspot and cannot seem to figure out how to link translated blog posts to their original. We have a single blog with multiple languages, and tested using both the legacy and the new/beta API.
The documentation mentions a "language" field, but it appears to be discarded when we add it to the JSON of a post creation request. Attempting to create the translation will then fail because "the master post has no language".
We've also noted that the JSON model of a blog post changes significatively when we create a translation manually from the admin, but posting this new model directly also cause the extra fields to be ignored. I suspect there is much more to translations than what is documented.
Are we missing something obvious? Any hints on how should we proceed?
I haven't looked back into it since, but for the records, we ended up going with a homebrew solution.
First, we ran some code that would retrieve the blog posts from the old blog, and import them into Hubspot, while taking notes of both the old and the new ID of the posts in a temporary database. We then manually went through the entire lists of Hubspot posts to set them up for translation. Once all the Hubspot posts had an empty translation tied to them, we ran some more code to retrieve the translated posts from the old blog, and used the temporary IDs database to cross-match them to the new translations and overwrite their content.
This ended up way more convoluted that we had hoped, but we needed it done and this let us move forward with the migration.
Thanks for your messages. I already found out that we can update existing translations. Now we're going to try to just create a new post in specific target language. We've tested that UI allows to then move such a post into existing multi-language group. Will let you know how it went for us later.
Currently, it is not possible to create/generate translated content via HubSpot APIs.
Having said that, I can honestly see a use case for this request and if you haven't already, I'd recommend jumping over to the HubSpot Ideas Forum and posting this idea there so that it's visible to the HubSpot product team and other HubSpot customers and developers. Hopefully this will gather more interest.