• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I use parameters with language files?

In my language file I need a sentence with a parameter in it.

In the CI native language files I've seen that some of them have a %s which works as parameter.
How can I use the same in my language files? How do I pass the words which will replace the %s?

oh, I think it is easier than I thought.
I suppose it is enough to use printf() when I have to to show the message.

It is indeed the printf-function that is used for these cases. You just cannot echo in this case but have to use a printf of the language-line Wink

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.