language detection

towards #3