Skip to content

Add Helper class or static methods to support more locales #5

@elPeiretti

Description

@elPeiretti

Feature proposal

It would be nice to have a Helper class used by the LocaleComboBox component with country conversion methods: https://www.iso.org/obp/ui/#search/code

  • Numeric to alpha 2
  • alpha 3 to alpha 2

Describe solution expectations

Something like:

public LocaleCountryConverter {

  // all possible conversions based on the iso table (hardcoded maybe?)
  private static Map<String,String> conversions;

  private LocaleCountryConverter() {}
  
    // returns ISO 3166-1-alpha-2 country code
    public static String convert(String countryCode) {
        return conversions.get(countryCode);
    }

}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions