Has anyone successfully rendered multi-language tr...
# advancedpdf
s
Has anyone successfully rendered multi-language translations based on customer language preference?
s
Yes! We have just completed a two month long process to do exactly this, to provide alternate translations in German for all of our templates, based on customer language preference. Some of the field labels on standard records provide translations out of the box, while for custom fields and records you need to create your own using a translation collection (or by setting language specific labels on the fields or forms). I’m happy to help with more specifics. The SuiteAnswers are not terribly helpful on this subject, so it took us a lot longer to figure out than it should have. The SA article is here, but fair warning that there are typos in all of the code samples, so they do not work: https://netsuite.custhelp.com/app/answers/detail/a_id/87471 I can help with functional syntax, if this is the approach you want to use.
Also, keep in mind that number formatting and date formats are distinct and separate from the language/locale settings, but there are ways to achieve that as well.
🎊 1
💥 1
s
@scottvonduhn Awesome! I will contact you if I run into any snags. I kept looking for that help article, and couldn’t find it, and then I looked in the SuiteBuilder Advanced PDF Templates Reference, and it’s not mentioned there either.
s
The correct syntax to use actually looks like this:
🙌🏼 1
💯 1
🎯 1
Also, another useful tip: FreeMarker has a setting named
locale
, and NetSuite passes in a global variable named
.locale
to the template. But, NetSuite does not set the FreeMarker
locale
to match the
.locale
variable automatically, however you can do it yourself (should be done right near the top of the document):
<#setting locale = .locale>
This makes number and date formatting in the template follow the Java conventions for number and date formatting for the locale.
😍 1
s
@scottvonduhn Thanks again! I am digging into it this week and will let you know how it goes!