Problem with Language class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Problem with Language class (/showthread.php?tid=35140) |
Problem with Language class - El Forum - 10-20-2010 [eluser]Agustín Villalba[/eluser] Hello! I need to make my site multilanguage. I have a question, how can I make a success message multilanguage when I have a variable in the message, something like this: "The product with the id $id has been created successfully". Is posible to put a variable in the message stored in the diferent language files?? Thank you. Problem with Language class - El Forum - 10-20-2010 [eluser]WanWizard[/eluser] Use sprintf() to replace parameters in strings, or use your own solution using str_replace(). Problem with Language class - El Forum - 10-20-2010 [eluser]Agustín Villalba[/eluser] That could be a great solution! Thank you very much WanWizard! |