I can think of using libraries, that get their config through environment variables. So you start your program, modify environment, and then start up the rest.
Look up the mess around LOCALE sometime.
The best the programmer can do is perform all the setenv calls before spawning any threads or making any library calls.