Skip to content

Conversation

@DanielHilton
Copy link
Contributor

  • Adding ISO-639-1 language code support
  • Adding tests

@DanielHilton DanielHilton marked this pull request as draft November 13, 2024 18:38
@netlify
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for biter777countries ready!

Name Link
🔨 Latest commit cbbe224
🔍 Latest deploy log https://app.netlify.com/sites/biter777countries/deploys/6735ff5f79159300089d68fb
😎 Deploy Preview https://deploy-preview-81--biter777countries.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@DanielHilton
Copy link
Contributor Author

@biter777 i'd welcome your feedback on this PR! 😄

@ccoVeille
Copy link

ccoVeille commented Nov 13, 2024

One question.

Your additions are related to languages. Except the mention of the country in a few methods.

I'm unsure it should be added to this repository.

I mean you could have created your own package dedicated to languages, that is could return its own constants.

Your code is good, and highly inspired from country one. But, this repository is about countries

I'm raising the point because I find strange to add languages (another iso norm) to a repository focused on country one

@ccoVeille
Copy link

Also, have you considered existing packages available?

Here are the few I found

https://github.com/emvi/iso-639-1
https://github.com/KtorZPersonal/go-iso-codes
https://github.com/KimMachineGun/lango
https://github.com/ttab/langos
https://github.com/atadzan/langconv

Implementing methods to get the languages from a country could be addee in these packages

@DanielHilton
Copy link
Contributor Author

DanielHilton commented Nov 13, 2024

One question.

Your additions are related to languages. Except the mention of the country in a few methods.

I'm unsure it should be added to this repository.

I mean you could have created your own package dedicated to languages, that is could return its own constants.

Your code is good, and highly inspired from country one. But, this repository is about countries

I'm raising the point because I find strange to add languages (another iso norm) to a repository focused on country one

This repo concerns itself with facets or properties of countries. This includes TLDs, dialing codes, regions and more. It stands to reason that when dealing with countries, it may be of use to include the language information about the country you are working with. This is not merely an ISO standard repo, as such I think it is relevant to be able to call countries.Switzerland.Languages() and be able to get LanguageGerman and LanguageFrench as an answer. This can help with localisation without relying on multiple libraries and patterns associated with each, or interop between one package and another.

@ccoVeille
Copy link

Please note, I'm not against the addition.

I raised a point to make sure and you replied

I like your PR.

LanguageTatar LanguageCode = "tt"
LanguageTwi LanguageCode = "tw"
LanguageTahitian LanguageCode = "ty"
LanguageTuvaluan LanguageCode = "tvl"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tvl is not available as an iso-code in iso 639-1, only in iso 639-2 alpha-3

You shouldn't mention here, or use 3 letter code everywhere (better option)

@ccoVeille
Copy link

Hi @DanielHilton

I found back this old PR

@armte
Copy link

armte commented Jul 11, 2025

Please note, I'm not against the addition.

I raised a point to make sure and you replied

I like your PR.

That makes two of us. I would like to contribute to this PR as I've encountered a few use cases for this functionality. @ccoVeille Can I receive write access to the repo so I can contribute? Thanks!

@ccoVeille
Copy link

Please note, I'm not against the addition.
I raised a point to make sure and you replied
I like your PR.

That makes two of us. I would like to contribute to this PR as I've encountered a few use cases for this functionality. @ccoVeille Can I receive write access to the repo so I can contribute? Thanks!

I wish I could, but I'm not a maintainer. I reviewed because I was also interested.

@armte
Copy link

armte commented Jul 12, 2025

Please note, I'm not against the addition.
I raised a point to make sure and you replied
I like your PR.

That makes two of us. I would like to contribute to this PR as I've encountered a few use cases for this functionality. @ccoVeille Can I receive write access to the repo so I can contribute? Thanks!

I wish I could, but I'm not a maintainer. I reviewed because I was also interested.

Ah I didn't realize you weren't a maintainer. Thanks for the message, I'll request write access from one of the maintainers 👍

@DanielHilton
Copy link
Contributor Author

i am not sure how often this code is maintained any more. The previous commit was a year ago. @biter777 is this code actively maintained any more? If it isn't, I may simply fork it to implement these changes.

@ccoVeille
Copy link

I made the same assumptions

@armte
Copy link

armte commented Jul 17, 2025

i am not sure how often this code is maintained any more. The previous commit was a year ago. @biter777 is this code actively maintained any more? If it isn't, I may simply fork it to implement these changes.

Yeah biter777 was last active in 05/2024:

image

I vote to fork it 👍

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

Successfully merging this pull request may close these issues.

3 participants