You can use a slug in dynamic routes for handling the locale, something like /pages/[locale]/products.
In products.js, you can retrieve the slug locale value and pass it to the Prismic query.
Reference:
On Prismic side, you need to create the pages in each locale to get the results from the query at the front end. For example, You will need to create the pages of Product type in both English and French locale.
Thank you so much for the prompt reply. I am very new to next.js + prismic. I've got the dynamic routing works for individual product pages. Wondering how should I approach the products.js page?
For instance, this is my code for products.js, however, this page does not show the language switcher (which is in the Header.js component).
/pages/en/products/[uid].tsx and /pages/fr/products/[uid].tsx in order to have localized pages for each locale and send different requests for each locale.