def METHOD_NAME(request, region_slug, language_slug):
    """
    List all POIs of the region and transform result into JSON
    :param request: The current request
    :type request: ~django.http.HttpRequest
    :param region_slug: The slug of the requested region
    :type region_slug: str
    :param language_slug: The slug of the requested language
    :type language_slug: str
    :return: JSON object according to APIv3 locations endpoint definition
    :rtype: ~django.http.JsonResponse
    """
    region = request.region
    # Throw a 404 error when the language does not exist or is disabled
    region.get_language_or_404(language_slug, only_active=True)
    result = []
    pois = (
        region.pois.prefetch_public_translations()
        .filter(
            archived=False,
            # Exclude locations without public translation in the default language
            translations__language=region.default_language,
            translations__status=status.PUBLIC,
        )
        .distinct()
        .select_related("category", "organization__icon")
        .prefetch_related(
            Prefetch(
                "category__translations",
                queryset=POICategoryTranslation.objects.select_related("language"),
            )
        )
    )
    if "on_map" in request.GET:
        try:
            location_on_map = strtobool(request.GET["on_map"])
        except ValueError as e:
            return JsonResponse({"error": str(e)}, status=400)
        pois = pois.filter(location_on_map=location_on_map)
    for poi in pois:
        if translation := poi.get_public_translation(language_slug):
            result.append(transform_poi_translation(translation))
    return JsonResponse(
        result, safe=False
    )  # Turn off Safe-Mode to allow serializing arrays