Ciao grazie tante mattialori per la risposta, ha funzionato
Ho risposto solo adesso perchè ho trovato il post dal motore di ricerca: non è arrivato l' avviso di risposta tramite e-mail, ho aggiornato il profilo
Si è presentato un altro problema sempre relativo all' utilizzo di Jtext, stavolta però riguarda il testo presente nelle e-mail che vengono inviate agli utenti
In questa parte di codice vengono elencati tutti gli elementi da spedire:
JUtility::sendMail($this->mailfrom, $this->fromname, $this->hotelInfo[0]->ht_contact_email_address, $subject, [color=red]$mailReport[/color], true);
$mailReport contiene varie informazioni di riepilogo ordinate in una tabella, vorrei poter tradurre le intestazioni di ciascuna riga ma non saprei proprio come fare:
<?php
$mailReport="<table width=\"100%\">
<tbody>
<tr>
<th colspan=\"4\" scope=\"row\">
<b>[color=red] You have successfully reserved[/color]:</b>
</th>
</tr>
<tr>
<td>
[color=red]Hotel Name[/color]
</td>
<td colspan=\"3\">".$this->hotelInfo[0]->hotel_name."<div align=\"right\">";
$star = $this->hotelInfo[0]->ht_startStatus;
for ($st =0; $st<$star; $st++){
$mailReport="<img src=\"components/com_hbsusers/css/star1.png\" />";
}
$mailReport="</div>
</td>
</tr>
<tr class=\"odd\">
<td>[color=red]Hotel Address[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_hotel_address."</td>
</tr>
<tr>
<td>[color=red]Country[/color]</td>
<td colspan=\"3\" id=\"room_name_td\">".$this->hotelInfo[0]->country_name."</td>
</tr>
<tr class=\"odd\">
<td>[color=red][color=pink]State[/color][/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->state_name."</td>
</tr>
<tr>
<td>[color=red]City[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->city_name."</td>
</tr>
<tr class=\"odd\">
<td>[color=red]Zip[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_zip_code."</td>
</tr>
<tr>
<td>[color=red]Phone[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_telephone1.", ".$this->hotelInfo[0]->ht_contact_mobile1."</td>
</tr>
<tr class=\"odd\">
<td>[color=red]E-mail Address[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_email_address."</td>
</tr>
<tr>
<td>[color=red]E-mail Address[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_email_address."</td>
</tr>
</tbody>
</table>
<br>
<table width=\"100%\">
<tbody>
<tr>
<th colspan=\"4\" scope=\"row\">
<b> User Information</b>
</th>
</tr>
<tr>
<td>Name</td>
<td colspan=\"3\">".$this->user->name."</td>
</tr>
<tr class=\"odd\">
<td>E-mail Address</td>
<td colspan=\"3\">".$this->user->email."</td>
</tr>
<tr>
<td>E-mail Address</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_email_address."</td>
</tr>
</tbody>
</table>
<br>
<table width=\"100%\">
<tbody>
<tr>
<th colspan=\"4\" scope=\"row\">
<b> Room Information</b>
</th>
</tr>
<tr class=\"odd\">
<td>Room name</td>
<td colspan=\"3\">".$this->data[0]->name."</td>
</tr>
<tr class=\"odd\">
<td>Check-in Date</td>
<td colspan=\"3\">".$this->data[0]->f_date."</td>
</tr>
<tr class=\"odd\">
<td>Check-out Date</td>
<td colspan=\"3\">".$this->data[0]->t_date."</td>
</tr>
</tbody>
</table>";
$subject = "Booking confirmation";
JUtility::sendMail($this->mailfrom, $this->fromname, $this->user->email, $subject, $mailReport, true);
JUtility::sendMail($this->mailfrom, $this->fromname, $this->hotelInfo[0]->ht_contact_email_address, $subject, $mailReport, true);
?>
Se inserisco ad esempio
<?php echo JText::_( 'RRI' ); ?>
La traduzione non funziona