Added new helper function for detecting the selected language by a cookie