Advertisement
Guest User

For Zack at Stackoverflow

a guest
Feb 28th, 2010
822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. When they click the English link, do something like this (you could use a cookies as well, I just do not use them that much)
  2.  
  3. <?php
  4.     session_start();
  5.    
  6.     $_SESSION['language'] = 'en-US';
  7. ?>
  8.  
  9. And when you go to a page on your site, make it check what language they speak and do something like this
  10.  
  11. <?php
  12.     $language = $_SESSION['language'] = 'en-US';
  13.  
  14.     if ($language == 'en-US') {
  15.         // do something here
  16.     } elseif (language == 'Chinise') {
  17.         // do something here
  18.     }
  19. ?>
  20.  
  21.  
  22.  
  23.  
  24. ~ Dr. Hydralisk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement