Giter Club home page Giter Club logo

Comments (4)

wooorm avatar wooorm commented on May 23, 2024

Hi @Bramzor.

That’s not possible. See GH-19 for more details.

from franc.

Bramzor avatar Bramzor commented on May 23, 2024

Aren't 639-3 more or less dialects? I always used "locales" before like en_US etc which is common, those are never 3 characters long. So it gets a lot more complex if 639-3 is used instead of 639-1. I understand your reasoning why it is complex to do as the current version is created for 639-3, but I would prefer a way to easily fix this in your code instead of forking the code. In the end 639-1 can be seen as a lower resolution of the 639-3 table? So it should be possible to go from 639-3 to 639-1. Other way wouldn't be possible.

Would it be ok to just introduce a new function inside franc that in worst case, uses a different lib to guess the 639-1 version?

I think it makes sense as there are already multiple people that raised the question before :-)

from franc.

Bramzor avatar Bramzor commented on May 23, 2024

We could use the following library: https://github.com/adlawson/nodejs-langs
langs.where("3", "kor")["1"]

Would translate ISO 639-3 to 639-1

from franc.

wooorm avatar wooorm commented on May 23, 2024

Aren't 639-3 more or less dialects?

No.

I always used "locales" before like en_US etc which is common, those are never 3 characters long.

Those are called BCP-47 tags, in this case with a language part (en, which may also be ISO 639-3) and a region indicator (US).

So it gets a lot more complex if 639-3 is used instead of 639-1. I understand your reasoning why it is complex to do as the current version is created for 639-3, but I would prefer a way to easily fix this in your code instead of forking the code.

The way to ease this pain is by continuing work on GH-30. Feel free to start work on that if you’d like this feature.

In the end 639-1 can be seen as a lower resolution of the 639-3 table? So it should be possible to go from 639-3 to 639-1. Other way wouldn't be possible.

Correct! Similar to ASCII vs Unicode!

from franc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.