changing keyboard within application
I've searched high and low and can't find any information about how to change keyboard layout within a Linux application. I don't need to remap keys or anything similar. I want everything to be standard wrt the keyboard in question, but I need to allow a user to select which of a number of standard keyboard layouts they are using, including US, Greek, Russian, etc. I've found some information on the web about the XKBD extension of X, but that seems oriented just toward configuring a system from the command line.
The application needs to do this because it's an embedded turnkey app running under IceWM; the IceWM environment will not be exposed to the user.