I'm struggling with advanced templates to format c...
# advancedpdf
e
I'm struggling with advanced templates to format currency values according to language. The issue is that in Canada English, a number is written $1,234.56 where in Canada French it is $1 234,56. I found the setting to change formatting based on currency alone, but we need currency + language. If I specify customer's number format in "preferences > number format", this changes the currency formatting on the pdf only, not in the email template. Is there a more elegant way to change the currency formatting in a template other than including something like
<#if locale == "fr_CA">somenumber?replace(",", " ")?replace(".", ",")</#if>
for every currency value that I want to include?
j
I hope there is. Even in SA there is sample code similar to what you have.
r
Have you tried using the nsformat_currency builtin fuction
e
@rustyshackles which currency should I use? I can't find a reference list for that anywhere. I still need to use canadian dollar, just format it differently.