Move locale registration to its own file.