<@U29JEQVL6> I initially started off using `nstran...
# advancedpdf
s
@al3xicon I initially started off using
nstranslation.get()
, but then realized that I had a lot of repetition, so I put all of the translation keys (which are actually functions) into a custom map variable. Then, I can use the following code to reference them:
${translations.TAX_AMT}
${translations.INVOICE}
a
nice!
i wound up not using nstranlation.load since you can't preload ALL keys (i wish we could, i get it though since that could load a lot of unnecessary stuff)
passing in the locale in each call is annoying, but i stored the locale as a variable so not a huge issue, just less pretty
s
there are definitely benefits of both approaches
a
absolutey