Language select: how to set up In the current set up for every English page, there's a Spanish equivalent.  Each page has its own unique URL. 

Previously we had it set up so that you could click "Spanish" within the English page and it would call the Spanish URL and visa-versa.

We've been asked to make it global -a button at the top of the site. 

Is there a clean way to detect what the Spanish equivalent is of the current page with PHP and make the switch?
Locale module by default provides you a block, Language Switcher, that switches language of the site. It's a list of installed language.

If you like a fancy switcher, you can install this module:
Language Switcher Dropdown


  Language Switcher Dropdown is a very simple module that exposes a new
  block, similar to the default Language Switcher block provided by
  Locale module. The new block allows site visitors to switch languages
  using a drop-down select list instead of using hyperlinks.
  
  The module also integrates well with Language Icons module if
  installed.


Here's an example