Just an update:
Here is a code using the 'checking browser language' code to make links with the lang, so when our visitor change the page, the lang keeps on
As example, my Portfolio link.
so, ?ddl=portfolio - If the lang already at url, print &lang={variable of URL} if not, check the browser language, check if have any of the ones available and print &lang={the browser lang}. Else, print &lang= en (english - 'default' one).Code:<a href="http://raphaelddl.com/?ddl=Portfolio<?php if( isset( $_GET['lang'] ) ){echo "&lang=" . $_GET['lang'];}else{if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){echo "&lang=en";}else{$idioma = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $idioma = substr($idioma,0,2); if( ( $idioma == "pt") or ( $idioma == "en") ) {echo "&lang=" . $idioma;}else{echo "&lang=en";}}} ?>"><?php echo $texto['Portfolio']; ?></a>


LinkBack URL
About LinkBacks

Reply With Quote

