We use a custom-format Print Format to print a quotation. A Quotation can be printed in 8 different languages, using the language selector in print preview.
That works fine.
Depending on the selected language for printing I have to change the format of showing dates.
if print language = DE, then use “dd. MMMM yyyy”
if print language = HU, then use “yyyy MMMM dd”
In my print format I access the selected language via frappe[“form_dict”][‘_lang’]
That works fine too.
But when sending a Quotation via Email as Attachement, a User can also select the language.
this language is not available via they way mentioned above
I get this error in my custom print format:
ACCESS TO ATTRIBUTE ‘_LANG’ of ‘DICT’ OBJECT IS UNSAFE.
How can I access the selected language to react on that in my custom print format on that?