-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
TLD > BCP 47 function? #17
Comments
Interesting problem! And hi, Michael 👋 First: this should definitely be another project. Maybe you could do a map of TLDs to BCP-47 tags, in JSON, but it should be outside Second: There are quite some TLDs (generic, test, infrastructure) that do not map to anything related to your problem. Third: TLDs are for countries (they’re often based on ISO 3166-1). BCP-47 is for languages. Some languages come with some geography information (e.g., To recap the biggest problem with your question: the |
hey dude thanks for the good feedback. totally agree in all points. let me explain the use case i have here to crack that problem: on www.videomail.io (try it out), users can enter recipient email addresses. when recipient views the videomail, the sent date is shown but always in the wrong format. hence i am thinking of a tld to bcp 47 converter for better date display. tld is based on the recipient's email address. that new project could be called totally aware that this isn't entirely accurate (see your dutch example) but it is still better than always displaying the hardcoded date format thoughts? |
I’d suggest using the I’d sa it’s a bad idea to do anything with bcp-47, and anyway, it should be a separate package! |
Probably not scope of your package but I am longing for a function to return me a BCP 47 language tag based by a top level domain (TLD).
Have initially reported the need in petert82/country-query#3 but since it seems inactive, and yours comes - after some research - the most close, I wonder why not ask you about that?
The text was updated successfully, but these errors were encountered: