languageCode property
The primary language subtag for the locale.
This must not be null.
This is expected to be string registered in the IANA Language Subtag Registry with the type "language". The string specified must match the case of the string in the registry.
Language subtags that are deprecated in the registry and have a preferred
code are changed to their preferred code. For example, const
Locale('he')
and const Locale('iw')
are equal, and both have the
languageCode he
, because iw
is a deprecated language subtag that was
replaced by the subtag he
.
Implementation
String get languageCode => _canonicalizeLanguageCode(_languageCode);