Welcome Guest, Not a member yet? Register   Sign In
Need help with language file
#1

[eluser]razerone[/eluser]
Hi for some reason my language file will not loaded in to the views. I have created a english language file called home.php but will lot load keep on getting error?

Unable to load the requested language file: language/english/home_lang.php

I have done it the correct way that user guide said to that didn't work and I have tried a couple of other ways to.

Just annoying when spend all day doing it to what user guide said to and still nothing worked. Can some one show me way by code?

I have auto loaded language helper also

This is what is in my language home.php

Code:
<?php

// Text

$lang['text_heading_latest'] = "Current News Of The Month";
$lang['text_heading_snippets'] = "New Snippets";
$lang['text_heading_projects'] = "Latest Projects";
#2

[eluser]Tpojka[/eluser]
Quote:Unable to load the requested language file: language/english/home_lang.php
Your file should be named:
home_lang.php
so when you call
$this->lang->load('home');
CI knows that is file
home_lang.php
#3

[eluser]razerone[/eluser]
[quote author="Tpojka" date="1383657874"]
Quote:Unable to load the requested language file: language/english/home_lang.php
Your file should be named:
home_lang.php
so when you call
$this->lang->load('home');
CI knows that is file
home_lang.php[/quote]

Do you know correct way to call it from controller to view

<h4>&lt;?php echo lang('text_heading_projects');?&gt;</h4>

Is there any thing else I missed in controller.

I have auto loaded url, html, form, language,
#4

[eluser]Tpojka[/eluser]
Is this fixed the problem?
What is the error now?
#5

[eluser]razerone[/eluser]
[quote author="Tpojka" date="1383658473"]Is this fixed the problem?
What is the error now?[/quote] no it is not fix I have just removed every thing to do with language files. And will start again. There are not many video tutorials on this subject I have noticed I find video tutorials are sometimes better than user guide.
#6

[eluser]razerone[/eluser]
[quote author="Tpojka" date="1383658473"]Is this fixed the problem?
What is the error now?[/quote]

I found out what I did wrong when re going through user guide. I found out my mistake.

I had to put home_lang.php like you said. I had put but mistake home.lang.php I have it working now.

I think I type to fast and do not proof read it would have to slow down I think

Cheers for help.
#7

[eluser]Tpojka[/eluser]
YW.

User guide is the must read for understanding whole concept. It is one of the best written outthere.




Theme © iAndrew 2016 - Forum software by © MyBB