Elxis CMS Forum
Support => Language => Topic started by: openita on December 29, 2015, 22:08:29
-
Hi!
I have a problem with Hotels 2.0
When I enter iosr> hotels> and I insert a hotel, in the window description and terms, Terms and conditions, write text in different languages, but when I save the whole, the site appears to me in Italian or better in the primary language and not in the various languages included. You may depend on what?
Thanks for your help.
-
Hello openita,
You have to initially write the terms and condition to your primary language and click apply.
While this process has been completed open the relative tab and choose from the list the
language you are interested in. Start translating the article into the other language of your
site and click on the save button [see attached image].
Now you can save the hotel with multilingual content.
(http://s22.postimg.org/l65bgz9r5/save_multiligual.jpg)
-
Thanks for the answer, but not working.
I did all the steps but the problem persists.
Main language Italian.
Secondary language German.
If I write in Italian and save, it all works out, I go in German, save the German, and I superimposed the Italian.
The problem is that when I do all these steps in the box description work perfectly, while pane terms and conditions Nos work makes me the above error.
Thank you
-
I can't re-produce this problem, for me it works fine.
In a few hours IOSR Hotels v2.2 will be released. Update to that version and if the problem remains reply below.
-
Hello!
I installed IOSR Hotels v2.2 but the problem persists. How can we solve that? Thank you very much for helping.
-
@openita Please send me a personal message with access details for your site administration section to see the problem by myself.
-
Ok!
I sent access details
-
I did the check on your site, you are right. "Terms and conditions" is not multilingual. I fixed it and I will soon release an updated version of IOSR Hotels. I have no access to your site FTP so follow my instructions below to fix it.
Fix multilingual terms and conditions in IOSR Hotels 2.0/2.2
Open file components/com_reservations/ext/hotels/controllers/hotels.php
Go to lines 965-970:
$row = $this->model->fetchHotel($hid);
if (!$row) {
$this->sendHeaders('text/plain');
echo '<div class="elx_error">'.$eLang->get('HOTEL_NOTFOUND').'</div>';
exit;
}
Add below:
if ($this->translate) {
$translations = $this->model->elementTrans($row->hid, $this->lng);
if ($translations) {
foreach ($translations as $element => $translation) {
switch($element) {
case 'hottitle': $row->title = $translation; break;
case 'hotdesc': $row->description = $translation; break;
case 'hotterms': $row->terms = $translation; break;
default: break;
}
}
}
unset($translations);
}
Thank for reporting this issue and sorry for the trouble.
-
Thanks to you for solving the problem ;)