itomo_locale_core 0.1.6 copy "itomo_locale_core: ^0.1.6" to clipboard
itomo_locale_core: ^0.1.6 copied to clipboard

ISO-driven world data for Dart — countries, currencies, languages, scripts, timezones with zero dependencies.

example/lib/main.dart

import 'package:itomo_locale_core/itomo_locale_core.dart';

void main() {
  // Look up a country by ISO 3166-1 alpha-2 code.
  final vn = WorldCountry.fromCca2('VN');
  print('${vn.flag} ${vn.commonName}');
  print('  Native:    ${vn.namesNative.first.common}');
  print('  Capital:   Hanoi');
  print(
    '  Currency:  ${vn.currencies.first.alpha3} (${vn.currencies.first.symbol})',
  );
  print('  Timezone:  ${vn.timezones.first}');

  // Look up a timezone.
  final tz = IanaTimezone.fromId('Asia/Ho_Chi_Minh');
  print('');
  print('${tz.tzId} → ${tz.utcOffset} (${tz.abbreviation})');

  // Currency formatting metadata.
  final usd = FiatCurrency.fromAlpha3('USD');
  print('');
  print(
    '${usd.alpha3}: ${usd.minorUnit} decimals, '
    'separator "${usd.thousandsSeparator}"',
  );
}
0
likes
160
points
120
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

ISO-driven world data for Dart — countries, currencies, languages, scripts, timezones with zero dependencies.

Homepage
Repository (GitHub)
View/report issues

Topics

#iso #i18n #country #currency #timezone

Funding

Consider supporting this project:

github.com

License

MIT (license)

More

Packages that depend on itomo_locale_core