Custom Quote Template Beta

CSarzana
Participant | Elite Partner
Participant | Elite Partner

Label translation

Hi everyone,

I'm trying to find the way to translate the "billing frequency label" and the "comments" and "terms" labels.

Can someone point me in the right direction?

 

At the moment I see there is no possibility to translate quote while creating it.

Thanks,

Camilla

6 Replies 6
jmclaren
HubSpot Employee
HubSpot Employee

Label translation

@CSarzana Thank you for replying. 

I understand. @joelgaudeul 's suggestion of getting the stored value and translating it that way would work.

I fully get though that puts more work on the developer to set that logic up vs just getting locale specific info returned for you right off the bat.

I will pass this along to the team. I can't make any promises as to timelines.

Jon McLaren

Sr. CMS Developer Advocate

Get started developing on the HubSpot CMS Developer Changelog
How to optimize your CMS Hub site for speed

If my reply answered your question, please mark it as a solution, to make it easier for others to find.

0 Upvotes
CSarzana
Participant | Elite Partner
Participant | Elite Partner

Label translation

Hi @jmclaren,

I believe your suggestion is not enough at the moment.

I already cloned the "line items table" module and translate every possible fields, but it's not possible to translate the billing frequency of a single item.
In the module I see a variable {{ item.recurringbillingfrequency }} and in my quotes I always see these lines in English.

CSarzana_0-1623307485663.png

 

Also, for Comments and Terms I don't find a way to translate the label or clone the modules as they seem to be "hardcoded".

 

{% module "comments" path="@hubspot/rich_text" html={{ module_defaults.comments }} %}

I tried to change the labels in Settings > Object > Quotes but if I do so, all my quotes show the default text (Lorem ipsum dolor...) instead of my custom box text.

 

0 Upvotes
joelgaudeul
Member

Label translation

Here is what I have done:

<td>{{item.amount|format_currency(LOCALE, CURRENCY, true) }} <br>{%- if item.recurringbillingfrequency -%} {{ item.recurringbillingfrequency }} {% if item.hs_recurring_billing_period == "P12M" %}{{ item.hs_recurring_billing_period|cut('P')|cut('M') }} mois{% else %}{{ item.hs_recurring_billing_period|cut('P')|cut('M') }} mois{% endif %}{% else %}1 {% endif %} </td> #}

The logic might be useful to you. 

I was able to understand the value and logic using: {{ template_data|pprint }}  which displays all the data. 

For you this would be : {% if item.hs_recurring_billing_period == "per_six_months" %}

jmclaren
HubSpot Employee
HubSpot Employee

Label translation

Right now the Custom Quote Template functionality does not have a multi-lingual aspect to it yet. We're aware of this need and are working towards it but it may be a little bit.
In the mean time you can clone the modules we provide:
@hubspot/cms-quotes-theme/modules/line_items_table.module

And where there is hardcoded english text, you can add fields to make it so the text is editable.

The advantage here is that you can then create 1 coded template, which can be used for different "sales manager templates" (one for each language you want to support).

In the future this workaround shouldn't really be needed or a different workflow will exist for handling separate languages. Making these changes now however wouldn't "hurt" the future workflow.

Jon McLaren

Sr. CMS Developer Advocate

Get started developing on the HubSpot CMS Developer Changelog
How to optimize your CMS Hub site for speed

If my reply answered your question, please mark it as a solution, to make it easier for others to find.

0 Upvotes
joelgaudeul
Member

Label translation

On my side we created 1 template per language, careful, it requires also to translate the esign module.

0 Upvotes
natsumimori
Community Manager
Community Manager

Label translation

@jmclaren and @ethankopit , is translate labels possible?

0 Upvotes