refactored get_lang to targetlang