stacker02 Posted September 30, 2010 Share Posted September 30, 2010 Hi, I have been bouncing my head for the past few days trying to figure this out and finally I figured I needed to google a forum where to ask people who actually know what they are talking about. I have a 4 language site built on a cms and I am trying to create a splash page that displays each language so you can choose which language you need. My issue is once you click the language and go back to the home domain, it defaults to English. The code I been playing with is below. Can anyone help me figure out what I need to do so I set the cookie properly? Thanks for any help or direction! <?php get_header(); ?> <script LANGUAGE="JavaScript"> <!-- hide from old browsers function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function setsplash() { setCookie("splash", "1", "", "/"); } //--> </SCRIPT> <div id="splash"> <div class="splash content"> <div class="splash enter"> <ul> <li class="en"><a onclick="setsplash()" href="" title="English">English</a></li> <li class="nl"><a onclick="setsplash()" href="http://b-e-m.org/nl/" title="Nederlands">Nederlands</a></li> <li class="fr"><a onclick="setsplash()" href="http://b-e-m.org/fr/" title="Français">Français</a></li> <li class="de"><a onclick="setsplash()" href="http://b-e-m.org/de/" title="Deutsch">Deutsch</li> </ul> </div> </div> </div> <?php get_footer(); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.