PackageTrack
Sign in Get early access

language_code

Get the current language code and Locale of the device. Also includes almost the language codes with English names and native names.

0.7.1 6.2K downloads/mo #3541 most downloaded on pub.dev lamnhan066/language_code

What this package is like to depend on

Last release 3 months ago

25 May 2026

Release timing varies

gaps range from 1 weeks to 11 months

Nearly every release is documented

notes for 20 of 20 stable releases

Nothing withdrawn

no release was ever pulled

4 years old

27 releases · first in 2023

7 releases in the last 12 months

see the full history below

Release timeline

27 releases · Jan 2023 to May 2026
2024 2025 2026
Release Pre-release

Releases

latest 27
  1. 0.7.1 25 May 2026
    Release notes
    • Add support for additional language codes including Spanish (Latin America) and Punjabi (India).
    • Add StoreCode and StoreSupportedCodes for enhanced store language support.
    • Update docs.
    Open source →
  2. 0.7.0 14 May 2026
    Release notes
    • Add resolveFromLocale and tryResolveFromLocale methods for flexible LanguageCodes retrieval from Locale.
    • [BREAKING CHANGE]: Update LanguageCode.code to use resolveFromLocale.
    • Add tests.
    • Update docs.
    Open source →
  3. 0.6.0 07 Mar 2026
    Release notes
    • Add Croatian language codes.
    • Update docs.
    • Add a weekly crawler to update the database.
    • Release to stable.
    Open source →
  4. 0.6.0-rc.5 02 Dec 2025 pre-release
    Release notes
    • Update the crawler for the name breaking change.
    • Use englishName for nativeName if there is no native names.
    Open source →
  5. 0.6.0-rc.4 02 Nov 2025 pre-release
    Release notes
    • Update tests for the name breaking change.
    Open source →
  6. 0.6.0-rc.3 02 Nov 2025 pre-release
    Release notes
    • [BREAKING CHANGE] The LanguageCodes.name is now return enum's name (default behavior of enum).
    • [BREAKING CHANGE] Bump dart sdk to >= 3.9.0 and flutter to ^3.35.0.
    • Add more tests.
    Open source →
  7. 0.6.0-rc.2 01 Sep 2025 pre-release
    Release notes
    • Add nativeLatinName and nativeNonLatinName to LanguageCodes. All the old codes will use the inherit latinName and nonLatinName from it main code. Example: aa_DJ will use the latinName and nonLatinName from aa.
    • Update the nativeName to use the first parsed name (instead of preferred non-latin name).
    • Improve the parser.
    Open source →
  8. 0.6.0-rc.1 26 Aug 2025 pre-release
    Release notes
    • Improve the LanguageCode.rawLocale method to be able to test.
    • Improve tests.
    • Improve README.
    Open source →
  9. 0.6.0-rc 26 Aug 2025 pre-release
    Release notes

    Added

    • New crawler script to fetch ISO 639-1 and ISO 639-2 codes from Wikipedia.

      • Extracts 2-letter and 3-letter codes.
      • Includes English names and native names in non-Latin (Latin) format when available.
      • Generates enum LanguageCodes with all codes.
      • Adds the missing codes from the older version.
    • LanguageCode.tryCode()

      • Retrieves the device language as LanguageCodes with an optional defaultCode.
      • Fallback order:
        1. Full rawLocale.
        2. rawLocale.languageCode.
        3. Returns defaultCode (default: LanguageCodes.und).

    Deprecated

    • LanguageCode.rawCode → use rawLocale.toString() instead.
    Open source →
  10. 0.5.5 01 Oct 2024
    Release notes
    • Update ku locale native name (thanks @msonntag13).
    • Add ckb, kmr, lki, prs & sdh locale entries (thanks @msonntag13).
    Open source →
  11. 0.5.4 20 Sep 2024
    Release notes
    • Return en_US locale if the device's locale is the standard C locale (C or POSIX).
    Open source →
  12. 0.5.3 16 Apr 2024
    Release notes
    • Able to set test by Locale.
    • Remove the version of Flutter environment.
    • Improve tests for Locale.
    • Improve tests for unavailable language.
    Open source →
  13. 0.5.3+1 17 Apr 2024
    Release notes
    • Add codecov badge.
    Open source →
  14. 0.5.3+2 17 Apr 2024
    Release notes
    • Run dart format to improve the score.
    Open source →
  15. 0.5.2 15 Apr 2024
    Release notes
    • Better to handle the way to get the [LanguageCode.code] to make it more compatible with the older major version.
    • Improve comments.
    • Mark LanguageCode.rawCode as deprecated, use LanguageCode.rawLocale.toString() instead.
    Open source →
  16. 0.5.1 04 Apr 2024
    Release notes
    • Add language codes: pa_PK, sr_SP.
    Open source →
  17. 0.5.0 04 Apr 2024
    Release notes
    • Add multiple language codes and country codes. Also add common ISO 639-3 language codes and country codes (851 in total).
    • BREAKING CHANGE: Remove englishNames and nativeNames to reduce the complexity. We only have englishName and nativeName from now.
    • BREAKING CHANGE: Method fromEnglishName and fromNativeName return as Iterable from this version.
    • Add LanguageCode.rawLocale to get the raw locale of the device.
    Open source →
  18. 0.4.2 27 Mar 2024
    Release notes
    • Add Spanish Argentina (Thanks @validcube).
    Open source →
  19. 0.4.1 26 Feb 2024
    Release notes
    • Add Filipino (Thanks @Ushie).
    • Add : to nativeName parameter in comments.
    Open source →
  20. 0.4.0 09 Jan 2024
    Release notes
    • Modify the englishName and nativeName to reduce the complexity:
      • zh("zh", "Chinese", "中文 (Zhōngwén)|汉语|漢語") -> zh("zh", "Chinese", "中文|Zhōngwén")
      • nl("nl", "Dutch", "Nederlands, Vlaams") -> nl("nl", "Dutch", "Nederlands")
      • el("el", "Greek|Modern", "Ελληνικά") -> el("el", "Greek", "Ελληνικά")
      • he("he", "Hebrew (modern)", "עברית") -> he("he", "Hebrew", "עברית")
      • ja("ja", "Japanese", "日本語 (にほんご/にっぽんご)") -> ja("ja", "Japanese", "日本語|にほんご|にっぽんご")
      • ko("ko", "Korean", "한국어 (韓國語)|조선말 (朝鮮語)") -> ko("ko", "Korean", "한국어|韓國語|조선말|朝鮮語|")
      • mr("mr", "Marathi (Marāṭhī)", "मराठी") -> mr("mr", "Marathi", "मराठी|Marāṭhī")
      • ro("ro", "Romanian|Moldavian|Moldovan", "română") -> ro("ro", "Romanian", "română")
      • sa("sa", "Sanskrit (Saṁskṛta)", "संस्कृतम्") -> sa("sa", "Sanskrit", "संस्कृतम्|Saṁskṛta")
      • to("to", "Tonga (Tonga Islands)", "faka Tonga") -> to("to", "Tonga", "faka Tonga")
      • za("za", "Zhuang|Chuang", "Saɯ cueŋƅ|Saw cuengh") -> za("za", "Zhuang|Chuang", "Saɯ cueŋƅ|Saw cuengh")
    • Add more language codes:
      • dz("dz", "Dzongkha", "རྫོང་ཁ")
      • sh("sh", "Serbo-Croatian", "Srpskohrvatski")
      • zu("zu", "Zulu", "isiZulu")
    • Add some common country codes:
      • nl_BE("nl_BE", "Flemish", "Vlaams")
      • en_AU("en_AU", "English (Australian)", "Australian English")
      • en_CA("en_CA", "English (Canadian)", "Canadian English")
      • en_GB("en_GB", "English (British)", "British English")
      • en_US("en_US", "English (American)", "American English")
      • fr_CA("fr_CA", "French (Canadian)", "français canadien")
      • fr_CH("fr_CH", "French (Swiss)", "français suisse")
      • de_AT("de_AT", "Austrian German", "Österreichisches Deutsch")
      • de_CH("de_CH", "Swiss High German", "Schweizer Hochdeutsch")
      • pt_BR("pt_BR", "Brazilian Portuguese", "português do Brasil")
      • pt_PT("pt_PT", "European Portuguese", "português europeu")
      • ro_MD("ro_MD", "Moldavian|Moldovan", "moldovenească")
      • es_ES("es_ES", "Spanish (Spain)", "español de España")
      • es_MX("es_MX", "Spanish (Mexico)", "español de México")
      • zh_CN("zh_CN", "Chinese (simplified)", "简体中文")
      • zh_TW("zh_TW", "Chinese (traditional)", "繁體中文")
    • BREAKING CHANGE NOTE: The method .fromEnglishName and .fromNativeName may be broken in this version because of those changes.
    Open source →
  21. 0.3.1 07 Oct 2023
    Release notes
    • Update comments.
    • Update homepage URL.
    Open source →
  22. 0.3.0 04 Aug 2023
    Release notes
    • Add englishName and nativeName to get the first value from englishNames and nativeNames.
    • Bring name back and returns englishName.
    Open source →
  23. 0.3.0-rc.1 26 Jul 2023 pre-release
    Release notes
    • Change from name to englishNames and returns a list of English names, the name was removed. Because it's a default value of enum so I have to change it to throw UnimplementedError.
    • Change from nativeName to nativeNames and returns a list of native names, nativeName was removed.
    • Change from .fromName to .fromEnglishName.
    Open source →
  24. 0.2.0 22 Jun 2023
    Release notes
    • Change from using window to PlatformDispatcher.
    • Using sdk: ">=2.18.0 <4.0.0" and flutter: ">=3.3.0".
    Open source →
  25. 0.1.1 22 Apr 2023
    Release notes
    • Add LanguageCode.setTestCode to set a LanguageCodes for testing.
    Open source →
  26. 0.1.0 11 Jan 2023
    Release notes
    • Add LanguageCodes, a pre-defined language code, name in English and name in Native for all the countries.
    • [BREAKING CHANGE] Rename from LanguageCode.code to LanguageCode.rawCode.
    • Add new LanguageCode.code, this variable will return as LanguageCodes.
    Open source →
  27. 0.0.1 02 Jan 2023
    Release notes
    • Initial release.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive