[ 'page_title' => 'Compañía — Platonic Companion Booking', 'nav_companions' => 'Companions', 'nav_how_it_works' => 'How it Works', 'nav_matches' => 'My Matches', 'nav_logout' => 'Logout', 'hero_title_1' => 'Find your perfect', 'hero_title_2' => 'platonic', 'hero_title_3' => 'companion.', 'hero_lead' => 'Book vetted companions for dinner dates, movie nights, or city tours. Safe, secure, and strictly platonic.', 'search_where' => 'Where?', 'search_city_any' => 'Any City', 'search_activity' => 'Activity / Keyword', 'search_placeholder' => 'e.g. Dinner, Coffee, Casual Dates...', 'search_button' => 'Search Companions', 'featured_companions' => 'Discover Companions', 'no_companions_found' => 'No new companions found. Check back later!', 'clear_filters' => 'Clear Filters', 'verified' => 'Verified', 'rate_per_hour' => '/hr', 'like_button' => 'Like', 'dislike_button' => 'Dislike', 'matches_title' => 'Your Matches', 'matches_empty' => 'No matches yet. Keep swiping!', 'match_modal_title' => 'It\'s a Match!', 'match_modal_body' => 'You and {name} have liked each other.', 'match_modal_button' => 'Keep Swiping', 'footer_copyright' => 'Compañía. All rights reserved.', 'footer_coc' => 'Strict Code of Conduct: Sexual services are strictly prohibited.', 'footer_safety' => 'Read our Safety Guidelines', ], 'es' => [ 'page_title' => 'Compañía — Reserva de Compañeros Platónicos', 'nav_companions' => 'Compañeros', 'nav_how_it_works' => 'Cómo Funciona', 'nav_matches' => 'Mis Matches', 'nav_logout' => 'Cerrar Sesión', 'hero_title_1' => 'Encuentra tu compañero', 'hero_title_2' => 'platónico', 'hero_title_3' => 'perfecto.', 'hero_lead' => 'Reserva compañeros verificados para cenas, noches de cine o tours por la ciudad. Seguro, protegido y estrictamente platónico.', 'search_where' => '¿Dónde?', 'search_city_any' => 'Cualquier ciudad', 'search_activity' => 'Actividad / Palabra Clave', 'search_placeholder' => 'Ej: Cena, Café, Citas Casuales...', 'search_button' => 'Buscar Compañeros', 'featured_companions' => 'Descubre Compañeros', 'no_companions_found' => 'No se encontraron nuevos compañeros. ¡Vuelve más tarde!', 'clear_filters' => 'Limpiar Filtros', 'verified' => 'Verificado', 'rate_per_hour' => '/hora', 'like_button' => 'Me gusta', 'dislike_button' => 'No me gusta', 'matches_title' => 'Tus Matches', 'matches_empty' => 'Aún no tienes matches. ¡Sigue deslizando!', 'match_modal_title' => '¡Es un Match!', 'match_modal_body' => 'A ti y a {name} se gustaron.', 'match_modal_button' => 'Seguir Deslizando', 'footer_copyright' => 'Compañía. Todos los derechos reservados.', 'footer_coc' => 'Código de Conducta Estricto: Los servicios sexuales están estrictamente prohibidos.', 'footer_safety' => 'Lee nuestras Guías de Seguridad', ], ]; function t($key, $replacements = []) { global $lang, $translations; // Fallback to session language if not passed explicitly $current_lang = $lang ?? $_SESSION['lang'] ?? 'en'; $text = $translations[$current_lang][$key] ?? $key; foreach ($replacements as $k => $v) { $text = str_replace('{'.$k.'}', $v, $text); } return $text; } function render_companion_card($companion) { if (!$companion) { return '

' . t('no_companions_found') . '

'; } $companion['img'] = $companion['profile_photo_path'] ?? 'assets/images/avatar_placeholder.svg'; $verified_badge = $companion['is_verified'] ? '
' . t('verified') . '
' : ''; return '
'.htmlspecialchars($companion['name']).' '.$verified_badge.'

'.htmlspecialchars($companion['name']).', '.$companion['age'].'

'.htmlspecialchars($companion['city']).'
'.number_format((float)($companion['hourly_rate'] ?? 0), 0).t('rate_per_hour').'
★ '.$companion['rating'].'

'.htmlspecialchars($companion['bio']).'

'; }