updated GetLangCode() function for Linux