refactor old getCurrentLanguage method