Are you a regular stikked user? Signup so you can keep track of your pastes!
  1. class My_Language extends CI_Language
  2. {
  3.  
  4.     /**
  5.      * Fetch a single line of text from the language array and allows to add vars like sprintf
  6.      *
  7.      * @access  public
  8.      * @param   string  $line   the language line
  9.      * @return  string
  10.      */
  11.     function linef($line)
  12.     {
  13.         $line = parent::line($line);
  14.         if ($line) {
  15.             $args = func_get_args();
  16.             array_shift($args); //Removes the line
  17.             return vsprintf($line, $args);
  18.         } else {
  19.             return $line;
  20.         }
  21.     }
  22.  
  23. } // END class My_Language

Reply to "Untitled"

Here you can reply to the paste above

Create a snipurl

Make Private

Feeling clever? Set some advanced options.