added getlanguage function