Split header language determination into a new submodule