Welcome Guest, Not a member yet? Register   Sign In
How can I use parameters with language files?
#1

[eluser]Alhazred[/eluser]
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?
#2

[eluser]Alhazred[/eluser]
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.
#3

[eluser]PhilTem[/eluser]
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




Theme © iAndrew 2016 - Forum software by © MyBB