Moved language codes to separate function