How can i pass complete language to a view |
hello
i have $data which including my datas from mysql. i want to pass language to a view with $data Code: $this->lang->load($settings->website_language . '_lang', $settings->website_language); how can i do that? and i want to use parser->parse instead of load->view. may i parse view with data and language?
It's easier to use lang helper function - it has access to the full language file without need of poluting view data object.
https://www.codeigniter.com/userguide3/h...elper.html (02-14-2016, 06:53 AM)siburny Wrote: It's easier to use lang helper function - it has access to the full language file without need of poluting view data object. I've read this page, maybe 100 times, but I can't see this code Code: $this->load->helper('language'); after add this code to my controller problem solved. Another question if it's possible i dont want to use php code in my template files. may i user parser for lang files? maybe Code: {lang->lang1} etc.. instead of Code: <?php echo lang("lang1") ?> is this possible? |
Welcome Guest, Not a member yet? Register Sign In |