Unfortunately, WP does not provide any way to detect if an ajax request is done on admin or on frontend. It has always been an issue for Polylang. So Polylang does provide one, but that means plugins using ajax on frontend must be aware of Polylang :(
You just have to set the variable 'pll_load_front' in the ajax request
http://polylang.wordpress.com/documentation/documentation-for-developers/general/
↧
Chouby on "[Plugin: Polylang] During Ajax calls, the server only responds with default language strings"
↧