// 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.", 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", terms: "Mietbedingungen", copyright: "Alle Rechte vorbehalten.", close: "Schliessen", editVehicle: "Fahrzeug bearbeiten", }, 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.", 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", terms: "Rental conditions", copyright: "All rights reserved.", close: "Close", editVehicle: "Edit vehicle", }, }; 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]; }); }