4

Can I load multiple language files for the same view in CodeIgniter?

0

3 Answers 3

5

ah...

Well it was pretty simple. I just loaded the two files with $this->lang->load().

$this->lang->load("lang_file1");
$this->lang->load("lang_file2");

Then after the view is loaded, I can use strings from the both files. But I'm not sure of the consequences of the same string being in different lang files.

I also saw that you can even load multiple views in CodeIgniter. Just have to load them consecutively and CodeIgniter will merge them into one view.

Sign up to request clarification or add additional context in comments.

1 Comment

You can also use $this->lang->load( array('file1', 'file2') );
0

This example loads one class from the system library and one from application library.

$this->load->library(array( 'form_validation','form_validate_supplement'));

Comments

0

From the codeigniter documentation,

$this->lang->load(array('menu', 'text'), 'french');

Codeigniter documentation

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.