After updating my HTC Dream from CyanogenMod 5.0.7 to 5.0.8 my keyboard layout has suddenly changed to english (QWERTY.
I found the solution in the CyanogenMod wiki, a bit hidden.
To solve the problem open a terminal on the phone and enter following:
mount /system -o rw,remount
cp trout-keypad-qwertz.kl trout-keypad-v3.kl
cp trout-keypad-qwertz.kcm.bin trout-keypad-v3.kcm.bin
You can, of course, also run this commands via the adb shell from your computer.
All you have to do then is to reboot your phone and that’s it.