- Translate content to English across messages/en.json, data/en, lib/data/en, and public/exemplos/en - Implement localized routing, slugs, and language negotiation with fallback to en - Build dedicated search index for English with strict book exclusion - Update components and pages to dynamically render localized strings and datasets - Verify full structural parity and exact 1:1 match on Portuguese pages via comparator Co-Authored-By: Antigravity <noreply@google.com>
18 lines
451 B
JavaScript
18 lines
451 B
JavaScript
import { construirIndiceBusca } from "@/lib/searchIndex";
|
|
|
|
export const dynamic = "force-static";
|
|
|
|
export function generateStaticParams() {
|
|
return [{ locale: "pt" }, { locale: "en" }];
|
|
}
|
|
|
|
export async function GET(request, { params }) {
|
|
const { locale } = await params;
|
|
const loc = locale === "en" ? "en" : "pt";
|
|
return Response.json(construirIndiceBusca(loc), {
|
|
headers: {
|
|
"Cache-Control": "no-cache, no-store, must-revalidate",
|
|
},
|
|
});
|
|
}
|