APIs & Integrations

abso-dbenoit
Participant

Creating translations for blog posts

Hello,

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?

0 Upvotes
7 Replies 7
abso-dbenoit
Participant

Creating translations for blog posts

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.

 

I invite anyone who needs this to vote on the Ideas Forums here:
https://community.hubspot.com/t5/HubSpot-Ideas/Create-blog-posts-translations-throught-the-API/idi-p...

0 Upvotes
KWęgrzynowicz
Participant

Creating translations for blog posts

Hi,

 

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.

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Creating translations for blog posts

Hey @abso-dbenoit,

 

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.

0 Upvotes
KWęgrzynowicz
Participant

Creating translations for blog posts

Hi!

Is it still the case? It's not possible to translate blog posts with the API?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Creating translations for blog posts

To the best of my knowledge, yes.

 

0 Upvotes
KWęgrzynowicz
Participant

Creating translations for blog posts

Hi @dennisedson 

Is it possible to change blog post language with the API?

I'm trying to do so but it seems like the language property is ignored by the API.

 

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Creating translations for blog posts

@KWęgrzynowicz not yet...

0 Upvotes