Optimize language selection and translations