Sending Emails in Multiple languages - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Sending Emails in Multiple languages (/showthread.php?tid=37577) |
Sending Emails in Multiple languages - El Forum - 01-13-2011 [eluser]Glazz[/eluser] Hi, I was wondering how do you guys send multilanguage emails. I know how to use the language file, but i need to have some variables inside the email messages, i tried using the parser, but no success, because the parser doesn't check passes data for variables. I don't want to make multiple views, i want to have only 1 view, that holds the html and css and inside that view i hold some vars, like {top} {message} {footer}, but inside message i need to have other variables, that's the problem, i don't know how to make it change the vars.. I know i can use str_replace, but there is another way ? Thanks in advance Sending Emails in Multiple languages - El Forum - 01-14-2011 [eluser]Cristian Gilè[/eluser] Quote:I know how to use the language file, but i need to have some variables inside the email messages, i tried using the parser, but no success, because the parser doesn’t check passes data for variables. Please, provide your code. Cristian Gilè Sending Emails in Multiple languages - El Forum - 01-14-2011 [eluser]Glazz[/eluser] Hi, In my controller i have something like this: Code: $this->load->library('parser'); View (email_template): Code: <html> Language file (not all of the file): Code: $lang['email_topo'] = 'Exmo(a). Sr(a). {nome},'; Current output: Exmo(a). Sr(a). {nome}, Expected output: Exmo(a). Sr(a). teste, The problem is that i need to have variables in the language lines, maybe i will sprintf or something Sending Emails in Multiple languages - El Forum - 03-14-2011 [eluser]surfweb[/eluser] I think I found the error: change this string in the file Whois.servers.php: .eu|whois.eu|FREE with .eu|whois.eu|AVAILABLE Sending Emails in Multiple languages - El Forum - 03-14-2011 [eluser]surfweb[/eluser] Sorry ... I was wrong thread |