Skip to content

Expose function to get the Country object based on a two-letter country string #5

Description

@kevcube

It's very common to get the country code as a two-char string from the user's locales on mobile or web, i.e.

  {
    "digitGroupingSeparator": ".",
    "languageCurrencySymbol": "$",
    "currencyCode": "USD",
    "languageTag": "en-US",
    "languageScriptCode": "Latn",
    "languageRegionCode": "US",
    "languageCode": "en",
    "languageCurrencyCode": "USD",
    "regionCode": "US",
    "decimalSeparator": ",",
    "temperatureUnit": "celsius",
    "measurementSystem": "metric",
    "currencySymbol": "$",
    "textDirection": "ltr"
  },

This library should expose a method which allows input of the US country code to retrieve the Country object, so we can use it in defaults (which expect a Country object)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions