EllisLab text mark
Advanced Search
     
How to pass the argument to the $lang?
Posted: 31 August 2007 01:11 AM   [ Ignore ]
Joined: 2007-08-30
21 posts

Hi,

The following code

$this->lang->line("required""login name"); 

I used the validation_lang.php, and in the file defined:

$lang['required']         "The %s field is requried."

I hope the “login name” will replace the “%s”, but what i got from the browser is

The %s field is requried.

How can I pass the argument to $lang? any documents for API?

 
Posted: 31 August 2007 01:15 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-08-30
21 posts

I found that i can use printf to work around the issue, but i guess there must have a more decent solution for this?