CodeIgniter Forums
Language helper not working, only showing variables as comments - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Language helper not working, only showing variables as comments (/showthread.php?tid=72082)



Language helper not working, only showing variables as comments - laurens300 - 11-02-2018

Hi guys,

I have made a language file I like to use.
Using my code in my View, it doesn't work. (see PHP Code)
When I retrieve the page it only shows the langauge as a html comment, without showing the variable value.... (see attachment)


PHP Code:
<?php

//Load header specific language file
$this->load->helper('language'); //Loads the language helper
$this->lang->load('header_lang'''); //Selects the default language

?>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">

  <?php echo '<title>' $this->lang->line('header_title') . '</title>'?>
  <?php echo '<meta name="description" content="' $this->lang->line('header_description') . '>'?>
  <?php echo '<meta name="author" content="' $this->lang->line('header_author') . '>'?>


[Image: Ulbxfhl]