CMS Development

MattStanleyWebb
メンバー

Label Translation, etc, for Custom German Quote

解決

Hi, just need some general guidance.

 

I'm using the design-manager to edit various modules of our Quotes, mostly "lines_items_table".  This module has hardcoded English text such as "SUBTOTALS".

 

What is the best approach to using this in a German language quote? I've read some forum advice, but it seems to be an area in flux.  The German quote is a separate template but presumably it uses original the customised module, not a clone?

 

I also need to change our main company address on German quotes - how is this sourced and what is the best way to alter it?

 

Just don't want to create a complex solution to a solved problem.  Well, hopefully it's solved 🙂

 

 

0 いいね!
1件の承認済みベストアンサー
Jake_Lett
解決策
ガイド役 | Solutions Partner
ガイド役 | Solutions Partner

Label Translation, etc, for Custom German Quote

解決

Are you trying to see {{ templateLang }}  when previewing the lines_item_table ? Or are you not seeing the value when previewing the quote template.html? If it is the former, the variable won't show unless you are viewing the entire document because the lines_item_table module is like a partial loaded into the full document.

元の投稿で解決策を見る

6件の返信
MattStanleyWebb
メンバー

Label Translation, etc, for Custom German Quote

解決

I can't see any documentation on where to add a global custom variable. If I add {%set templateLang = "en" %} to the Header section of the Quote it will work within the header module, but if I add {{ templateLang }} to the lines_item_table, for example, it is blank.

 

Any advice?

0 いいね!
Jake_Lett
解決策
ガイド役 | Solutions Partner
ガイド役 | Solutions Partner

Label Translation, etc, for Custom German Quote

解決

Are you trying to see {{ templateLang }}  when previewing the lines_item_table ? Or are you not seeing the value when previewing the quote template.html? If it is the former, the variable won't show unless you are viewing the entire document because the lines_item_table module is like a partial loaded into the full document.

Jake_Lett
ガイド役 | Solutions Partner
ガイド役 | Solutions Partner

Label Translation, etc, for Custom German Quote

解決

The way I have handled this is by having two quote templates that reference the same line items module.

  • Basic quote - English
  • Basic quote - German


    On the individual templates create a variable like {%set templateLang = "en" %} you can then write that on your body class like <body class="basic-quote { templateLang}}">

 

Then in your line_items module you can write conditional logic for that language variable like {% if templateLang == "en" %}Subtotals{% elif templateLang == "de" %}Zwischensummen{%endif %} 

 

You can then use that conditional logic anywhere else you need it.

MattStanleyWebb
メンバー

Label Translation, etc, for Custom German Quote

解決

Thanks, that seems like a logical approach. Is there any documentation for adding a variable to the template ({%set templateLang = "en" %}) or is it trivial, ie you just pop it where you want?

 

Either way, appreciate your help with this.

0 いいね!
MattStanleyWebb
メンバー

Label Translation, etc, for Custom German Quote

解決

Thanks for your reply.  The need for translation hasn't arisen before, so I'm looking for the "best practice" approach and some guidance for its implementation.

 

Thanks.

0 いいね!
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Label Translation, etc, for Custom German Quote

解決

@A_Wessolly@karstenkoehler, @Jake_Lett   how have you all been tackling translations?

0 いいね!