APIs & Integrations

mhason
Member

HubDB Translation

SOLVE

Hi,

We currently have a web page that gets all content from a HubDB table. I need to add an additional language to this page. Creating just a translation of the page is obviously not working because the HubDB itself needs to be translated, but I can't find any option to add a translation to the HubDB table.

Can anyone suggest how to approach this, please? Are HubDB tables translatable or do I need to create a completely separate table for each language?

Thanks in advance
Maurice

1 Accepted solution
LeifInouye
Solution
HubSpot Alumni
HubSpot Alumni

HubDB Translation

SOLVE

Hi Maurice,

There is presently no way to create a translation of a HubDB table without cloning said table and populating the translated page with data from said clone.

View solution in original post

0 Upvotes
3 Replies 3
LeifInouye
Solution
HubSpot Alumni
HubSpot Alumni

HubDB Translation

SOLVE

Hi Maurice,

There is presently no way to create a translation of a HubDB table without cloning said table and populating the translated page with data from said clone.

0 Upvotes
mhason
Member

HubDB Translation

SOLVE

Thank you @Leif

That's what I thought would be the answer, and meanwhile waiting for someone to reply that's exactly what I did.

0 Upvotes
LPM
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

HubDB Translation

SOLVE

I went around this issue by creating several columns in my database

i.e

  • name
  • chinese name

Then in my custom modules I have:

{% if (content.slug is string_startingwith "zh-cn/") or (content.slug =="zh-cn") %} 
{{ row.chinese_name }}
{% else %}
{{ row.name }}
{% endif %}