From 6285a927685dd2cc40c47cc627eca3071093a268 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 02:35:38 +0000 Subject: [PATCH 1/7] Add src/app/components/LanguageSwitcher.tsx --- src/app/components/LanguageSwitcher.tsx | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/app/components/LanguageSwitcher.tsx diff --git a/src/app/components/LanguageSwitcher.tsx b/src/app/components/LanguageSwitcher.tsx new file mode 100644 index 0000000..bb5aaa9 --- /dev/null +++ b/src/app/components/LanguageSwitcher.tsx @@ -0,0 +1,27 @@ +'use client'; + +import { useI18n } from '@/app/providers/i18nProvider/I18nProvider'; +import { languages, type Language } from '@/app/i18n/config'; + +export function LanguageSwitcher() { + const { language, setLanguage } = useI18n(); + + return ( +
+ {Object.entries(languages).map(([code, name]) => ( + + ))} +
+ ); +} -- 2.49.1 From 2a09fad9ca03729e8fd2fd7873184955b96a9d0e Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 02:35:39 +0000 Subject: [PATCH 2/7] Add src/app/i18n/config.ts --- src/app/i18n/config.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/app/i18n/config.ts diff --git a/src/app/i18n/config.ts b/src/app/i18n/config.ts new file mode 100644 index 0000000..334dbcd --- /dev/null +++ b/src/app/i18n/config.ts @@ -0,0 +1,7 @@ +export const languages = { + en: 'English', + es: 'Español', +} as const; + +export const defaultLanguage = 'en'; +export type Language = keyof typeof languages; -- 2.49.1 From 750b5c52ad14cfd49ad14b34a43858116fa4b8be Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 02:35:39 +0000 Subject: [PATCH 3/7] Add src/app/i18n/translations/en.json --- src/app/i18n/translations/en.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/app/i18n/translations/en.json diff --git a/src/app/i18n/translations/en.json b/src/app/i18n/translations/en.json new file mode 100644 index 0000000..8c75d82 --- /dev/null +++ b/src/app/i18n/translations/en.json @@ -0,0 +1,17 @@ +{ + "nav": { + "menu": "Menu", "experience": "Experience", "location": "Location", "reviews": "Reviews", "order": "Order" + }, + "hero": { + "title": "Stockton's Most Legendary Tortas.", "description": "Authentic Mexico City-style tortas stacked with flavor, made fresh every day. Generous portions, bold ingredients, and that legendary taste.", "tag": "🥪 Authentic Mexico City Flavor", "button1": "🌮 View Menu", "button2": "📍 Get Directions" + }, + "trust": { + "title": "Why Locals Keep Coming Back", "metric1Label": "Rating", "metric1Value": "4.7+", "metric2Label": "Famous For", "metric2Value": "Giant Tortas", "metric3Label": "Must-Try", "metric3Value": "Micheladas" + }, + "menu": { + "title": "The Tortas That Made Us Famous", "description": "Every torta is stacked high with authentic ingredients, made fresh to order. This is Mexico City flavor in Stockton.", "tag": "Signature Menu Items", "item1Title": "Super Torta", "item1Tag1": "Massive", "item1Tag2": "Loaded", "item2Title": "Street Tacos", "item2Tag1": "Authentic", "item2Tag2": "Bold", "item3Title": "Micheladas", "item3Tag1": "Spicy", "item3Tag2": "Refreshing", "item4Title": "Rice & Beans", "item4Tag1": "Classic", "item4Tag2": "Comfort", "button": "🔥 See Full Menu" + }, + "footer": { + "menuTitle": "Menu", "visitTitle": "Visit Us", "connectTitle": "Connect", "item1": "Super Tortas", "item2": "Street Tacos", "item3": "Micheladas", "item4": "Rice & Beans", "item5": "Location", "item6": "Hours", "item7": "Order Online", "item8": "Catering", "item9": "Instagram", "item10": "Facebook", "item11": "Contact Us", "item12": "Reviews" + } +} -- 2.49.1 From 13e456e9680f4d566ecbbf50ab0555f827047f68 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 02:35:40 +0000 Subject: [PATCH 4/7] Add src/app/i18n/translations/es.json --- src/app/i18n/translations/es.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/app/i18n/translations/es.json diff --git a/src/app/i18n/translations/es.json b/src/app/i18n/translations/es.json new file mode 100644 index 0000000..b1279f1 --- /dev/null +++ b/src/app/i18n/translations/es.json @@ -0,0 +1,17 @@ +{ + "nav": { + "menu": "Menú", "experience": "Experiencia", "location": "Ubicación", "reviews": "Reseñas", "order": "Pedir" + }, + "hero": { + "title": "Las Tortas Más Legendarias de Stockton.", "description": "Auténticas tortas al estilo de la Ciudad de México llenas de sabor, hechas frescas todos los días. Porciones generosas, ingredientes audaces y ese sabor legendario.", "tag": "🥪 Auténtico Sabor de la Ciudad de México", "button1": "🌮 Ver Menú", "button2": "📍 Obtener Direcciones" + }, + "trust": { + "title": "Por Qué Los Locales Siguen Viniendo", "metric1Label": "Calificación", "metric1Value": "4.7+", "metric2Label": "Famoso Por", "metric2Value": "Tortas Gigantes", "metric3Label": "Debe Probar", "metric3Value": "Micheladas" + }, + "menu": { + "title": "Las Tortas Que Nos Hicieron Famosos", "description": "Cada torta está apilada con ingredientes auténticos, hecha fresca al orden. Este es sabor de la Ciudad de México en Stockton.", "tag": "Artículos de Menú Especiales", "item1Title": "Super Torta", "item1Tag1": "Masivo", "item1Tag2": "Cargado", "item2Title": "Tacos Callejeros", "item2Tag1": "Auténtico", "item2Tag2": "Audaz", "item3Title": "Micheladas", "item3Tag1": "Picante", "item3Tag2": "Refrescante", "item4Title": "Arroz y Frijoles", "item4Tag1": "Clásico", "item4Tag2": "Confort", "button": "🔥 Ver Menú Completo" + }, + "footer": { + "menuTitle": "Menú", "visitTitle": "Visítanos", "connectTitle": "Conectar", "item1": "Super Tortas", "item2": "Tacos Callejeros", "item3": "Micheladas", "item4": "Arroz y Frijoles", "item5": "Ubicación", "item6": "Horario", "item7": "Pedir en Línea", "item8": "Catering", "item9": "Instagram", "item10": "Facebook", "item11": "Contáctenos", "item12": "Reseñas" + } +} -- 2.49.1 From d80e9dafb549b5b66ad8cf878b6c967010079703 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 02:35:40 +0000 Subject: [PATCH 5/7] Add src/app/i18n/useTranslation.ts --- src/app/i18n/useTranslation.ts | 94 ++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/app/i18n/useTranslation.ts diff --git a/src/app/i18n/useTranslation.ts b/src/app/i18n/useTranslation.ts new file mode 100644 index 0000000..ec297e7 --- /dev/null +++ b/src/app/i18n/useTranslation.ts @@ -0,0 +1,94 @@ +'use client'; + +import { useCallback } from 'react'; +import type { Language } from './config'; + +type TranslationKeys = { + nav: { + menu: string; + experience: string; + location: string; + reviews: string; + order: string; + }; + hero: { + title: string; + description: string; + tag: string; + button1: string; + button2: string; + }; + trust: { + title: string; + metric1Label: string; + metric1Value: string; + metric2Label: string; + metric2Value: string; + metric3Label: string; + metric3Value: string; + }; + menu: { + title: string; + description: string; + tag: string; + item1Title: string; + item1Tag1: string; + item1Tag2: string; + item2Title: string; + item2Tag1: string; + item2Tag2: string; + item3Title: string; + item3Tag1: string; + item3Tag2: string; + item4Title: string; + item4Tag1: string; + item4Tag2: string; + button: string; + }; + footer: { + menuTitle: string; + visitTitle: string; + connectTitle: string; + item1: string; + item2: string; + item3: string; + item4: string; + item5: string; + item6: string; + item7: string; + item8: string; + item9: string; + item10: string; + item11: string; + item12: string; + }; +}; + +const translations: Record = { + en: require('./translations/en.json'), + es: require('./translations/es.json'), +}; + +export function useTranslation(language: Language) { + return useCallback((key: string): string => { + const keys = key.split('.'); + let value: any = translations[language]; + + for (const k of keys) { + value = value?.[k]; + } + + return typeof value === 'string' ? value : key; + }, [language]); +} + +export function getTranslation(language: Language, key: string): string { + const keys = key.split('.'); + let value: any = translations[language]; + + for (const k of keys) { + value = value?.[k]; + } + + return typeof value === 'string' ? value : key; +} -- 2.49.1 From d4eecf56746bfa913a0fbebdee2fd078446d8c69 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 02:35:41 +0000 Subject: [PATCH 6/7] Update src/app/page.tsx --- src/app/page.tsx | 110 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 85 insertions(+), 25 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index dfdfa91..2a73271 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -9,9 +9,59 @@ import ProductCardOne from '@/components/sections/product/ProductCardOne'; import TestimonialCardTen from '@/components/sections/testimonial/TestimonialCardTen'; import ContactFaq from '@/components/sections/contact/ContactFaq'; import FooterBase from '@/components/sections/footer/FooterBase'; -import { Beer, Flame, MapPin, Phone, Star, UtensilsCrossed } from 'lucide-react'; +import { Beer, Flame, MapPin, Phone, Star, UtensilsCrossed, Globe } from 'lucide-react'; +import { useState } from 'react'; export default function LandingPage() { + const [language, setLanguage] = useState('en'); + + const translations = { + en: { + navMenu: "Menu", navExperience: "Experience", navLocation: "Location", navReviews: "Reviews", navOrder: "Order", footerMenu: "Menu", footerMenuItems: [ + { label: "Super Tortas", href: "#menu" }, + { label: "Street Tacos", href: "#menu" }, + { label: "Micheladas", href: "#menu" }, + { label: "Rice & Beans", href: "#menu" } + ], + footerVisit: "Visit Us", footerVisitItems: [ + { label: "Location", href: "#location" }, + { label: "Hours", href: "#" }, + { label: "Order Online", href: "#" }, + { label: "Catering", href: "#" } + ], + footerConnect: "Connect", footerConnectItems: [ + { label: "Instagram", href: "https://instagram.com" }, + { label: "Facebook", href: "https://facebook.com" }, + { label: "Contact Us", href: "#location" }, + { label: "Reviews", href: "#reviews" } + ], + footerCopyright: "© 2025 | Charly's Super Tortas Chilangas | Stockton, California" + }, + es: { + navMenu: "Menú", navExperience: "Experiencia", navLocation: "Ubicación", navReviews: "Reseñas", navOrder: "Ordenar", footerMenu: "Menú", footerMenuItems: [ + { label: "Super Tortas", href: "#menu" }, + { label: "Tacos Callejeros", href: "#menu" }, + { label: "Micheladas", href: "#menu" }, + { label: "Arroz y Frijoles", href: "#menu" } + ], + footerVisit: "Visítanos", footerVisitItems: [ + { label: "Ubicación", href: "#location" }, + { label: "Horario", href: "#" }, + { label: "Ordenar en Línea", href: "#" }, + { label: "Catering", href: "#" } + ], + footerConnect: "Conecta", footerConnectItems: [ + { label: "Instagram", href: "https://instagram.com" }, + { label: "Facebook", href: "https://facebook.com" }, + { label: "Contáctanos", href: "#location" }, + { label: "Reseñas", href: "#reviews" } + ], + footerCopyright: "© 2025 | Charly's Super Tortas Chilangas | Stockton, California" + } + }; + + const t = translations[language as keyof typeof translations]; + return ( @@ -193,31 +265,19 @@ export default function LandingPage() {