[ 'not_found' => 'Recipe not found', 'not_found_sub' => 'Try searching for something else.', 'back_home' => '← Back to all recipes', 'nutrition' => 'Nutrition', 'calories' => 'Calories', 'protein' => 'Protein', 'carbs' => 'Carbs', 'fat' => 'Fat', 'ingredients' => 'Ingredients', 'utensils' => 'Utensils', 'steps' => 'Steps', 'also_tasty' => 'Also tasty', 'more_dishes' => 'More dishes to keep you cooking.', 'prep' => 'Prep', 'cook' => 'Cook', 'total' => 'Total', 'serves' => 'Serves', 'level' => 'Level', ], 'de' => [ 'not_found' => 'Rezept nicht gefunden', 'not_found_sub' => 'Versuche eine andere Suche.', 'back_home' => '← Zurück zu allen Rezepten', 'nutrition' => 'Nährwerte', 'calories' => 'Kalorien', 'protein' => 'Protein', 'carbs' => 'Kohlenhydrate', 'fat' => 'Fett', 'ingredients' => 'Zutaten', 'utensils' => 'Küchenwerkzeug', 'steps' => 'Schritte', 'also_tasty' => 'Auch lecker', 'more_dishes' => 'Noch mehr zum Nachkochen.', 'prep' => 'Vorbereitung', 'cook' => 'Garen', 'total' => 'Gesamt', 'serves' => 'Portionen', 'level' => 'Level', ], ]; $t = $copy[$lang]; $allRecipes = load_recipes(); $slug = isset($_GET['slug']) ? trim($_GET['slug']) : ''; $recipeRaw = $slug ? find_recipe_by_slug($allRecipes, $slug) : null; $recipe = $recipeRaw ? localize_recipe($recipeRaw, $lang) : null; $allRecipesLocal = localize_recipes($allRecipes, $lang); $langSwitchLabel = $lang === 'de' ? 'EN' : 'DE'; $langSwitchHref = lang_url($lang === 'de' ? 'en' : 'de'); if (!$recipe) { http_response_code(404); $pageTitle = $t['not_found'] . ' | FlixCooks'; $description = $t['not_found_sub']; include __DIR__ . '/partials/head.php'; include __DIR__ . '/partials/header.php'; ?>

<?php echo e($recipe['title']); ?>

: : : : :
0 || $recipe['nutrition']['protein'] > 0 || $recipe['nutrition']['carbs'] > 0 || $recipe['nutrition']['fat'] > 0)): ?>

$t['calories'], 'value' => $nutri['calories'], 'unit' => 'kcal', 'pct' => min(100, round(($nutri['calories']/2000)*100))], ['label' => $t['protein'], 'value' => $nutri['protein'], 'unit' => 'g', 'pct' => min(100, round(($nutri['protein']/50)*100))], ['label' => $t['carbs'], 'value' => $nutri['carbs'], 'unit' => 'g', 'pct' => min(100, round(($nutri['carbs']/260)*100))], ['label' => $t['fat'], 'value' => $nutri['fat'], 'unit' => 'g', 'pct' => min(100, round(($nutri['fat']/70)*100))] ]; ?>

<?php echo e($other['title']); ?>

🙂