a smarter language selection