EllisLab/CodeIgniter — pull request #1502 by webspy (2012-06-18 14:30:22+00:00)
Title: Allow placeholders in language lines

I'm proposing a new function to be added to the language helper, lang_format(), which adds support for placeholders in the line of text. These placeholders can be replaced with actual values:

// $lang['language_key1'] = 'You have ? new messages.';
// $lang['language_key2'] = 'Are you sure you want to remove %s from %s ?';

echo lang_format('language_key1', 10);
// outputs: You have 10 new messages.

echo lang_format('language_key2', array('Item 1', 'Category 1'), '%s');
// outputs: Are you sure you want to remove Item 1 from Category 1 ?

Please excuse any mistakes in the pull procedure, I'm new to GitHub.