Add method for language detection

Signed-off-by: Marthyn Olthof <marthyn@live.nl>