---
title: "Why doesn't Flutter generate localization files?"
description: "Learn why Flutter may not generate the necessary localization files and how configuration issues with gen_l10n and cache problems with Flutter Intl are among the common reasons. Discover how to overcome these obstacles and generate the required localization files."
category: flutter
date: 2023-03-29
updated: 2026-10-09
canonical: https://localizely.com/i18n-questions/flutter/why-does-not-flutter-generate-localization-files/
---

# Why doesn't Flutter generate localization files?

When it comes to generating localization files in Flutter, the root of the problem depends on the approach used for localization. There are two main generators used for localization in Flutter: [gen_l10n](/blog/flutter-localization-step-by-step/?tab=using-gen-l10n) and [Flutter Intl](/blog/flutter-localization-step-by-step/?tab=automated-using-flutter-intl).

The most common reason why gen_l10n doesn't generate the needed localization files is that it is not properly configured. One of the common mistakes that people make is putting the `l10n.yaml` file in the wrong directory, like the `lib` folder instead of the project root. Another one is a missing `generate: true` line in the `flutter` section of the `pubspec.yaml` file, which is required for the generation to run. Moreover, since Flutter 3.32 gen_l10n no longer generates the localization files as a synthetic package (`package:flutter_gen`) but writes them into your source tree, by default into the `arb-dir` folder (`lib/l10n`) or into the folder set by `output-dir` in `l10n.yaml`. If you don't see the localization files in the project, check these folders (on older Flutter versions they were in the `.dart_tool/flutter_gen/gen_l10n` folder). Also, you can always manually invoke generation by running the `flutter gen-l10n` command and check if there are any errors in the console.

For Flutter Intl, the main reason why it may not generate localization code is after upgrading Flutter, there might be a problem with the cache. However, reactivating the globally activated `intl_utils` package can solve this problem.

Source: https://localizely.com/i18n-questions/flutter/why-does-not-flutter-generate-localization-files/
