// The menu's languages (plan step 6.4, owner 2026-11-18): English and Greek, the same list as the // backend's core/menu_languages.py. A product's own name is its base text; a translation adds // the other language; a missing translation shows the base text. export const MENU_LANGUAGES = ['el', 'en'] /** The languages a venue translates its menu into: every menu language but its own. */ export const translatedLanguages = venueLanguage => MENU_LANGUAGES.filter(l => l !== venueLanguage) /** A product's or category's text in a language: `names` / `descriptions` {lang: text} as the * backend resolves them for customer screens, else the base text. */ export const inLanguage = (texts, lang, base) => (texts && texts[lang]) || base