This is a followup to T109372, which isn't doable without such information.
When Lua script is run, it doesn't know its section, therefore it has no way to validate its parameters and arguments which validity depends on the section (like language).
Additionally, it would be best for Lua scripts to have access to the common document context, such that they can exchange information, because some wiktionary templates are inter-dependent, some information can be mutually exclusive, etc. Currently, there is no way to validate the language, and no way to tell if potentially contradictory information has been submitted.