Hi guys, I am writing a helper for our app that will return if the page is not in english. At first this was my check:
!params[:lang].nil? || !cookies[:lang].nil? || !session[:lang].nil? || !session[:locale] || !params[:locale]
(i looked at params, cookies, and sessions) if any of them wasn't nil, then I'd immediately conclude that the user clicked on our translate link(which introduces the params[:lang] and add it to the session and cookie.
One thing I forgot is that if the user switched back to "en", then it would still be !nil. Is there a quick and easy way/call of checking if the page isn't in English? Or am i stuck with doing a lot of ifs for each params, cookies and sessions to check if they exist AND if they are in english?