| @@ -16,8 +16,9 @@ | ||
| 16 | 16 | { |
| 17 | 17 | public function display($tpl = null) |
| 18 | 18 | { |
| 19 | 19 | $app = JFactory::getApplication(); |
| 20 | + $vbo_tn = VikBooking::getTranslator(); | |
| 20 | 21 | |
| 21 | 22 | // set noindex instruction for robots |
| 22 | 23 | JFactory::getDocument()->setMetaData('robots', 'noindex, nofollow'); |
| 23 | 24 | |
| @@ -59,8 +60,10 @@ | ||
| 59 | 60 | // map the information |
| 60 | 61 | $roomsData = array_map(function($roomId) { |
| 61 | 62 | return VikBooking::getRoomInfo($roomId, [], true); |
| 62 | 63 | }, $involvedRoomIds); |
| 64 | + // translate records | |
| 65 | + $vbo_tn->translateContents($roomsData, '#__vikbooking_rooms'); | |
| 63 | 66 | // turn the list into associative |
| 64 | 67 | $roomsData = array_combine(array_column($roomsData, 'id'), array_values($roomsData)); |
| 65 | 68 | } |
| 66 | 69 | |
| @@ -66,8 +69,9 @@ | ||
| 66 | 69 | |
| 67 | 70 | // set template properties |
| 68 | 71 | $this->quoteData = $quoteData; |
| 69 | 72 | $this->roomsData = $roomsData; |
| 73 | + $this->vbo_tn = $vbo_tn; | |
| 70 | 74 | |
| 71 | 75 | // display template |
| 72 | 76 | parent::display($tpl); |
| 73 | 77 | } |