check LC_MESSAGES before checking LANG

LC_MESSAGES is the standard way to set the language of the displayed messages if the user wants it to be different than the one set in LANG.