getAcceptLanguage method refactored