title: How to echo lang('my_translated_string'); using anchor tag in CodeIgniter?
body: <p>I am using <strong>internationalization i18n class</strong> and wondering <strong>how could I echo my translated text for my menu items, from my language files using anchor tag</strong> provided by CodeIgniter.</p>
  
  <p>E.g. this works for both of my languages correct:</p>
  
  <pre><code>&lt;a href="http://example.com"&gt;&lt;?php echo lang('link_to_example_com'); ?&gt;&lt;/a&gt;
  </code></pre>
  
  <p>And it is translated correctly using English language files when I am on /en or German when on /de </p>
  
  <p>but this is not working:</p>
  
  <pre><code>&lt;?php
  $translated_text = lang('link_to_example_com');
  echo anchor('http://example.com', $translated_text);
  ?&gt;
  </code></pre>
  
  <p>How to use anchor in this case with a variable or lang function?</p>
  
  <p>Thanks in advance.</p>