Welcome Guest, Not a member yet? Register   Sign In
Load language file automatically
#6

[eluser]Assim[/eluser]
[quote author="cahva" date="1266795024"]Load the language helper. You'll be using language class alot so you might just add it to autoload.[/quote]
That is already done. :#

[quote author="cahva" date="1266795125"]Extending is really easy. Just add that MY_Controller controller as MY_Controller.php to libraries folder and then in your controllers you extend MY_Controller instead of Controller.[/quote]
Done all that but now I got a few problems.

I only need those for the header and footer, so I will try with the header to test this out.

When using load view:
- <?php echo lang('something'); ?> doesn't work.
- $something also doesn't work. I get an error like "Undefined variable: something" although it's in MY_Controller.php

When using parser:
- {something} doesn't work and I get an error like "Invalid argument supplied for foreach()"

Is there any other way to do this? I don't mind if it was hard but at least the texts in my header and footer shouldn't be repeated in every controller.


Messages In This Thread
Load language file automatically - by El Forum - 02-21-2010, 08:51 AM
Load language file automatically - by El Forum - 02-21-2010, 09:30 AM
Load language file automatically - by El Forum - 02-21-2010, 10:26 AM
Load language file automatically - by El Forum - 02-21-2010, 11:30 AM
Load language file automatically - by El Forum - 02-21-2010, 11:32 AM
Load language file automatically - by El Forum - 02-21-2010, 12:34 PM
Load language file automatically - by El Forum - 02-21-2010, 02:48 PM
Load language file automatically - by El Forum - 02-22-2010, 02:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB