Your confusion is to "return" to the controller. Do not think of it as from controller => View (passing it says $data['something'] variables).
This is basically a <form> , so look at the form helper , and then check the form . This will give you an idea of how to create a form using codeigniter syntax.
In your controller, you do a check, and if it matches the language (or whatever you send), you can use sessions to save it for each page (so you don't need this in the url).
Sessions are very simple and saving an element is as simple as:
$this->session->set_userdata('varname', 'value');
Later, on every other controller, you can check the variable
$language = $this->session->userdata('varname');
Jakub source share