CakePHP 2 - Language Detection

Good day everyone!

Hi, I was wondering if there’s any chance to detect the language entered and assign it to a field before saving? I was trying to develop something that would automatically assign the the language to an hreflang tag upon viewing.

Thank you in advance!

HTTP has a Content-Language header you could check.

Will try that sir. Thank you so much!