Strapi V4 how to use populate deep with i18n localization

Version : 4.1.12
Node : (node v14.19.1)
Edition: Community

Can you describe your problem in deep? please.

Hey Luis, i found a solution thank you for reaching out!
I was struggling to add locales to the query with populate=deep to get access to the dynamic zones.

can you write your solution here, please?

It can be useful for other people with the same problem.

"use strict";

 *  food-and-drinks-page controller

const { createCoreController } = require("@strapi/strapi").factories;

module.exports = createCoreController(
  ({ strapi }) => ({
    async find(ctx) {
      const { query } = ctx;

      const entity = await strapi.entityService.findMany(
          populate: "deep",
      const sanitizedEntity = await this.sanitizeOutput(entity, ctx);

      return this.transformResponse(sanitizedEntity);



So, it means you have to add this code to your controllers, right?