The idea is to generate a translation object (Lang...
# suitescript
m
The idea is to generate a translation object (Languages) but there are many strings to translate, for which we discard a custom record For the same reason, we are looking at the possibility of doing it in a function or ideally in a class
s
SuiteScript 2.0 and 2.1 actually have the
N/translation
module for this exact purpose. The documentation is a bit lacking, but I have used it successfully for a few scripts.
There’s a lot to read, but you can start with SA id: 92567
In particular, you need to enable the multi-language feature, set up the languages you want to use under general preferences, then define one or more Translation Collections. Within a collection you can defines “strings” which are single Keys that map to different values, depending upon the locale/language
once that is set up, you can use N/translation to get multi-language string support in your scripts and advanced PDF templates