WPML language translation not working in wordpress ajax call

Recently, I had come across a issue which I thought very useful to share with the developers working on WordPress and using WPML for language translations. Issue: WPML language translation not working in wordpress ajax call Solution: 1. Make sure you are passing language variable in with ajax url. e.g. http://www.example.com?lang=ar 2. Use the following…