benjamincurrie/CodeIgniter-Language-Switch — Issue #1: question
Author: tragoro
Created: 2012-02-08 13:10:36+00:00
State: open

hello,

I' tried to use your code in a project, but i can't figure out what is the problem.

I use url's like this: http://site.com/index.php?lang=en&page=controller&action=function

I did copy all of your files to codeigniter app.

In controller i have something like this:

....
$this->load->helper('language');
...
$this->lang->load('language_file_name');
.....
and i parse the text to the view $data['text']=$this->lang->line('text');

(is this necessary?)

in your language config i have:

$config['url_style'] = "Query";
$config['languages'] = array('english'=>'English', 'hungarian'=>'Hungarian');
$config['browser_language_detection'] = TRUE;
$config['language_codes'] = array(
'en' => 'english',
'hu' => 'hungarian'
);

in autoload php you had:
$autoload['helper'] = array('uri');
(this gives an error back)

"Unable to load the requested file: helpers/uri_helper.php", so i think you mean $autoload['helper'] = array('url'); (because you have a MY_url_helper?!

Finally: Nothing happens if i change lang=en to lang=hu. Any idea?

Thanks.