Btw. vitamin, you didn't clarify why the LANG environment variable has any effect on the keyboard layout. IMHO it should not have any effect, but it should solely specify what language an application uses in its UI. If the LANG variable controlled the keyboard layout, switching on-the-fly between multiple keyboard layouts would not be possible, since you cannot change an environment variable for an application while the application is running.