Builder public api key
19df7a9799d34a46b5ed0010ee47fd78
Code stack you are integrating Builder with
NextJS
What are you trying to accomplish
We’re looking into using Builder.io but need the ability to have translated URLs. For example, English (default) would be /features and German would be /funktionen.
Since Builder doesn’t support this natively, I figured I could create a separate field translatedPageUrl and then query by it. However, I can’t seem to get the query right to find a page by its translatedPageUrl value.
I’ve tried a few different things, e.g.
page = await builder
.get("page", {
query: {
// I have also tried nesting differently, with and without the de-DE, with and without `.eq` etc. From the docs it's not really clear how to query by localized content
"data.translatedPageUrl.de-DE": "/builder/builder-uebersetzungs-test",
},
// I have tried with and without this:
// options: {
// locale: "de-DE",
// },
})
.toPromise()
By following these guidelines, you should be able to handle the querying of localized URLs effectively in Builder.io. If there are any issues or further questions, feel free to reach out!