[eluser]Shiro[/eluser]
Dear all,
I just want to ask is it possible load two language files into one controller?
what I face the problem is when I load another language file, my html will added another "invisible" character, not sure is "nextline" or "space", when I paste to ANSI encoding text, it show ? beside <html>.
This is the test I run with CI 1.7.2, and with WAMP
I downloaded the CI framework unpacked it,
CASE 1:
in the default controller (welcome.php) I added
Code:
function index()
{
$this->lang->load('error', 'english');
//$this->lang->load('test', 'english');
$this->load->view('welcome_message');
}
the view file
Code:
<body>
<?php echo $this->lang->line('test');?>
<h1>Welcome to CodeIgniter!</h1>
in the file system, /language , I create these two file
error_lang.php and test.php, these two files are having same content which is
Code:
<?php
$lang['test'] = "test";
When I load the controller, the page is ok, load perfectly. Because it just load one language file.
But when I uncomment another language file, there got an extra character come out.
CASE 2:
in the default controller (welcome.php) I added
Code:
function index()
{
$this->lang->load('error', 'english');
$this->lang->load('test', 'english');
$this->load->view('welcome_message');
}
So, I just want to ask is it possible load two language files into one controller? or this is CI bug?
Edit:
The reason I ask is because I got another CI project, when I load 2 language files, the top part of the header will go down a next line. but if I load 1 language file, no problem for it.