---
title: "Do I need to include the country code in the locale in Flutter?"
description: "No. However, if you want to cover more variations of the language (e.g. `es-ES`, `es-MX`, etc.), then it is required. The same applies to script codes (e.g. `zh-Hans`, `zh-Hant`, etc.). It should also be noted that it is a good practice to have a generic fallback language in order to avoid wrong language resolution."
category: flutter
date: 2023-02-01
updated: 2026-10-09
canonical: https://localizely.com/i18n-questions/flutter/do-i-need-to-include-the-country-code-in-the-locale-in-flutter/
---

# Do I need to include the country code in the locale in Flutter?
  
No.

However, if you want to cover more variations of the language (e.g. `es-ES`, `es-MX`, etc.), then it is required.  
The same applies to script codes (e.g. `zh-Hans`, `zh-Hant`, etc.).

It should also be noted that it is a good practice to have a generic fallback language in order to avoid wrong language resolution.

```dart
// Full Chinese support for CN, TW, and HK
supportedLocales: <Locale>[
  const Locale.fromSubtags(languageCode: 'zh'), // generic Chinese 'zh'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'), // generic simplified Chinese 'zh_Hans'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'), // generic traditional Chinese 'zh_Hant'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'), // 'zh_Hans_CN'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'TW'), // 'zh_Hant_TW'
  const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'HK'), // 'zh_Hant_HK'
],
```

Source: https://localizely.com/i18n-questions/flutter/do-i-need-to-include-the-country-code-in-the-locale-in-flutter/
