May 3, 2022 10:28 AM
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 🙂
Solved! Go to Solution.
May 11, 2022 6:03 AM
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.
May 10, 2022 7:31 AM
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?
May 11, 2022 6:03 AM
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.
May 5, 2022 9:37 AM
The way I have handled this is by having two quote templates that reference the same line items module.
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.
May 5, 2022 12:20 PM
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.
May 5, 2022 4:08 AM
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.
May 4, 2022 12:18 PM - edited May 5, 2022 9:13 AM
@A_Wessolly , @karstenkoehler, @BootstrapC how have you all been tackling translations?