// Translations shared between public site and admin panel. export const translations = { de: { navCars: "Fahrzeuge", navWhy: "Warum wir", navReviews: "Stimmen", navBook: "Buchen", bookNow: "Jetzt buchen", viewFleet: "Flotte ansehen", heroEyebrow: "MC Cars · Sportwagenvermietung", heroTitle: "Fahren auf hoechstem Niveau.", heroLead: "Premium-Sportwagen und Luxusklasse in der Steiermark. Kautionsfrei, transparent, sofort startklar.", statDeposit: "Kaution", statSupport: "Support", statCars: "Fahrzeuge", fleetEyebrow: "Unsere Flotte", fleetTitle: "Handverlesen. Gepflegt. Startklar.", fleetSub: "Filtern Sie nach Marke und Preis. Klicken Sie fuer Details oder buchen Sie direkt.", filterBrand: "Marke", filterSort: "Sortierung", filterPrice: "Max. Preis / Tag", all: "Alle", sortPriceAsc: "Preis aufsteigend", sortPriceDesc: "Preis absteigend", sortPowerDesc: "Leistung absteigend", details: "Details", book: "Buchen", perDay: "pro Tag", hp: "PS", kmh: "km/h", accel: "0-100", seats: "Sitze", from: "ab", noMatches: "Keine Fahrzeuge gefunden.", whyEyebrow: "Warum MC Cars", whyTitle: "Keine Kompromisse zwischen Sicherheit und Fahrspass.", whyInsurance: "Versicherungsschutz", whyInsuranceText: "Vollkasko mit klarem Selbstbehalt. Transparente Kosten auf jedem Kilometer.", whyFleet: "Premium Flotte", whyFleetText: "Handverlesene Performance-Modelle, professionell gewartet und sofort startklar.", whyDeposit: "Kautionsfrei", whyDepositText: "Sie zahlen nur die Miete. Kein Kapital blockiert, kein unnoetiger Aufwand.", reviewsEyebrow: "Kundenmeinungen", reviewsTitle: "Erlebnisse, die bleiben.", review: "Kundenmeinung", bookingEyebrow: "Jetzt buchen", bookingTitle: "Traumwagen unverbindlich anfragen.", fieldName: "Name", fieldEmail: "E-Mail", fieldPhone: "Telefon", fieldCar: "Fahrzeug", fieldFrom: "Von", fieldTo: "Bis", fieldMessage: "Nachricht", messagePlaceholder: "Wuensche, Uhrzeit, Anlass...", sendRequest: "Anfrage senden", invalidDates: "Bitte ein gueltiges Datum waehlen (Bis > Von).", bookingSuccess: "Danke! Wir melden uns in Kuerze per E-Mail.", bookingFailed: "Anfrage konnte nicht gesendet werden. Bitte erneut versuchen.", footerTagline: "Sportwagenvermietung in Oesterreich. Standort: Steiermark (TBD).", footerLegal: "Rechtliches", footerContact: "Kontakt", footerNav: "Navigation", imprint: "Impressum", privacy: "Datenschutz", footerTerms: "Mietbedingungen", copyright: "Alle Rechte vorbehalten.", close: "Schliessen", editVehicle: "Fahrzeug bearbeiten", adminNavWebsite: "Website", adminChangePw: "Passwort aendern", adminLogout: "Logout", adminLeads: "Leads", adminCustomers: "Kunden", adminVehicles: "Fahrzeuge", adminNewVehicle: "Neues Fahrzeug", adminAllVehicles: "Alle Fahrzeuge", adminPhotoUpload: "Foto hochladen (JPG/PNG/WebP, max 50 MB)", adminPhotoUrl: "Foto-URL (wird automatisch gesetzt nach Upload)", adminBrand: "Marke", adminModel: "Modell", adminPower: "PS", adminSpeed: "Top-Speed km/h", adminAccel: "0-100", adminSeats: "Sitze", adminPrice: "Preis / Tag (€)", adminSort: "Reihenfolge", adminLocation: "Standort", adminDescDe: "Beschreibung (Deutsch)", adminDescEn: "Description (English)", adminActiveVisible: "Aktiv / auf Website sichtbar", adminSave: "Speichern", adminReset: "Neu", adminPhoto: "Foto", adminBrandTable: "Marke / Modell", adminPriceTable: "€ / Tag", adminActive: "Aktiv", adminDel: "Löschen", adminQualify: "Qualifizieren", adminReject: "Ablehnen", adminReopen: "Wieder öffnen", adminDetails: "Details", adminSetInactive: "Inaktiv setzen", adminSetActive: "Aktiv setzen", adminActiveLeads: "Aktive Leads", adminClosedLeads: "Abgeschlossen", adminSourceLead: "Quelle (Lead)", adminFirstContact: "Erster Kontakt", adminNameEmail: "Name / E-Mail", adminPhone: "Telefon", adminStatus: "Status", adminReceived: "Eingang", adminVehicleTab: "Fahrzeug", adminPeriod: "Zeitraum", }, en: { navCars: "Fleet", navWhy: "Why us", navReviews: "Reviews", navBook: "Book", bookNow: "Book now", viewFleet: "View fleet", heroEyebrow: "MC Cars · Sports car rental", heroTitle: "Drive at the highest level.", heroLead: "Premium sports and luxury cars in Styria. No deposit, full transparency, ready to launch.", statDeposit: "Deposit", statSupport: "Support", statCars: "Vehicles", fleetEyebrow: "Our Fleet", fleetTitle: "Hand-picked. Maintained. Ready.", fleetSub: "Filter by brand or price. Click for details or book directly.", filterBrand: "Brand", filterSort: "Sort", filterPrice: "Max price / day", all: "All", sortPriceAsc: "Price ascending", sortPriceDesc: "Price descending", sortPowerDesc: "Power descending", details: "Details", book: "Book", perDay: "per day", hp: "HP", kmh: "km/h", accel: "0-62", seats: "Seats", from: "from", noMatches: "No vehicles match the filters.", whyEyebrow: "Why MC Cars", whyTitle: "No compromises between safety and driving joy.", whyInsurance: "Insurance", whyInsuranceText: "Comprehensive cover with a clear deductible. Transparent costs on every kilometer.", whyFleet: "Premium fleet", whyFleetText: "Hand-picked performance models, professionally maintained and ready to go.", whyDeposit: "No deposit", whyDepositText: "You only pay rent. No blocked capital, no unnecessary overhead.", reviewsEyebrow: "Testimonials", reviewsTitle: "Experiences that last.", review: "Review", bookingEyebrow: "Book now", bookingTitle: "Request your dream car without obligation.", fieldName: "Name", fieldEmail: "Email", fieldPhone: "Phone", fieldCar: "Vehicle", fieldFrom: "From", fieldTo: "To", fieldMessage: "Message", messagePlaceholder: "Wishes, timing, occasion...", sendRequest: "Send request", invalidDates: "Please pick valid dates (To > From).", bookingSuccess: "Thank you! We'll get back to you shortly.", bookingFailed: "Request could not be sent. Please try again.", footerTagline: "Sports car rental in Austria. Location: Styria (TBD).", footerLegal: "Legal", footerContact: "Contact", footerNav: "Navigation", imprint: "Imprint", privacy: "Privacy", footerTerms: "Rental conditions", copyright: "All rights reserved.", close: "Close", editVehicle: "Edit vehicle", adminNavWebsite: "Website", adminChangePw: "Change password", adminLogout: "Logout", adminLeads: "Leads", adminCustomers: "Customers", adminVehicles: "Vehicles", adminNewVehicle: "New vehicle", adminAllVehicles: "All vehicles", adminPhotoUpload: "Upload photo (JPG/PNG/WebP, max 50 MB)", adminPhotoUrl: "Photo URL (auto-set after upload)", adminBrand: "Brand", adminModel: "Model", adminPower: "HP", adminSpeed: "Top speed km/h", adminAccel: "0-62", adminSeats: "Seats", adminPrice: "Price / day (€)", adminSort: "Sort order", adminLocation: "Location", adminDescDe: "Description (German)", adminDescEn: "Description (English)", adminActiveVisible: "Active / visible on website", adminSave: "Save", adminReset: "New", adminPhoto: "Photo", adminBrandTable: "Brand / Model", adminPriceTable: "€ / day", adminActive: "Active", adminDel: "Delete", adminQualify: "Qualify", adminReject: "Reject", adminReopen: "Reopen", adminDetails: "Details", adminSetInactive: "Set inactive", adminSetActive: "Set active", adminActiveLeads: "Active leads", adminClosedLeads: "Closed", adminSourceLead: "Source (Lead)", adminFirstContact: "First contact", adminNameEmail: "Name / Email", adminPhone: "Phone", adminStatus: "Status", adminReceived: "Received", adminVehicleTab: "Vehicle", adminPeriod: "Period", }, }; export const REVIEWS = { de: [ { quote: "Top Service und perfekt vorbereitete Fahrzeuge. Unser Wochenendtrip war ein Highlight.", author: "Laura K." }, { quote: "Die Buchung war klar und schnell. Der GT3 war in einem herausragenden Zustand.", author: "Martin P." }, { quote: "Sehr professionelles Team und ehrliche Kommunikation zu allen Konditionen.", author: "Sina T." }, ], en: [ { quote: "Excellent service and flawlessly prepared cars. Our weekend trip was unforgettable.", author: "Laura K." }, { quote: "Booking was clear and fast. The GT3 arrived in outstanding condition.", author: "Martin P." }, { quote: "Very professional team and transparent communication on all terms.", author: "Sina T." }, ], }; export function getLang() { return localStorage.getItem("mccars.lang") || "de"; } export function setLang(lang) { localStorage.setItem("mccars.lang", lang); } export function t(key) { const lang = getLang(); return (translations[lang] && translations[lang][key]) || key; } export function applyI18n(root = document) { const lang = getLang(); document.documentElement.lang = lang; root.querySelectorAll("[data-i18n]").forEach((el) => { const key = el.dataset.i18n; if (translations[lang][key]) el.textContent = translations[lang][key]; }); root.querySelectorAll("[data-i18n-placeholder]").forEach((el) => { const key = el.dataset.i18nPlaceholder; if (translations[lang][key]) el.placeholder = translations[lang][key]; }); }