Well, its simply add check at index header which will look for post/get variable "lang" with flag, and if it does, call your toolset for GT(q. there is list of vars been translated, if so then its simple).
But if you use only php, it mean page will just reload after language select, why you don't want use js for dynamic change? key elements have ids?