For example say i have a package im making which has two files, one serves as a template which is takes user defined inputs(for example language) and applies the template to the document. The other file is a bunch of utility functions, and i want them to change their displayed content depending on the user defined language, for example a function birthday_cake() that renders in a birthday cake with happy birthday written on it, with the happy birthday being displayed in the language the user specified.
The problem is I dont want the user(who imports the package) to have to tassle with having to pass their settings to each and every file and secondly i want to be able to dynamically define my functions based on those settings(so i dont have to have multiple copies of essentially the same functions with diffrent names).
Id very much appreciate solutions or ideas. thank you.