Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subdivisions #30

Open
puschie286 opened this issue Sep 13, 2024 · 3 comments
Open

Subdivisions #30

puschie286 opened this issue Sep 13, 2024 · 3 comments

Comments

@puschie286
Copy link

puschie286 commented Sep 13, 2024

Hi,

what do you think about adding subdivision (ISO 3166-2) information ?

We need that for some project so im currently implementing it (europe + usa for now). Its basically an ISubdivisionInfo with informations from wikipedia and iso obp and an subdivision list on country info.

If you are interested, i would prepare an PR with structure and some reference definitions.

here is our structure so far:

public interface ISubdivisionInfo
{
	/// <summary>
	/// CommonName
	/// </summary>
	string CommonName { get; }
	/// <summary>
	/// NativeName
	/// </summary>
	string OfficialName { get; }
	/// <summary>
	/// ISO-3166-2 code
	/// </summary>
	string TextCode { get; }
	/// <summary>
	/// Subdivision code
	/// </summary>
	SubdivisionCode Code { get; }
	/// <summary>
	/// Subdivison category
	/// </summary>
	SubdivisionCategory Category { get; }
}

CommonName is the reference name (from wikipedia, mostly english)
OfficialName is the iso name (mostly local)
SubdivisionCode is an enum with all subdivison codes (without the - ) from here

was thinking about adding administration language but it seems that you dont have this on the CountryInfo and the LanguageCode enum is part of the translation project

@tinohager
Copy link
Member

Yes, I could imagine that. My suggestion would be to implement it like Nager.Country.Translation simply as an additional module to Nager.Country. This would not increase the size of the main package.

@tinohager
Copy link
Member

@puschie286 is there any news here yet?

@puschie286
Copy link
Author

@tinohager looks good so far, we have a working solution in use for a few weeks now. It may have some unusual (related to the your base project) things like fixed enum values or extension methods.
Created a PR for this state #33 with all relevant changes.
If you like to have the generators for the subdivision files and initializer classes, i can add them too or send them - didnt see them in the country project so i left them out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants