Added locale detection in application controller