richtr / guessLanguage.js

A natural language detection library based on trigram statistical analysis for Node.js and the Web.
http://richtr.github.com/guessLanguage.js/
211 stars 39 forks source link

Corrected pt language codes to BCP 47 format. #5

Open PlNG opened 11 years ago

PlNG commented 11 years ago

Should now be parsable when thrown into a language tag parser.

PlNG commented 11 years ago

man I am so not good at the githubs. Will get better.

richtr commented 11 years ago

Thank you for taking the time to do this :)

The BCP-47 updates are a good idea but does this change break backward compatibility with code that may be using this library already? I'm tempted to simply merge this update and see if there is any pushback from any developers on this change. On the other hand, it might make sense to maintain both "pt_BR" and "pt-BR" in the code.

I will await your reply before merging the BCP47 changes.

richtr commented 9 years ago

Language support was added in https://github.com/richtr/guessLanguage.js/commit/865b170f637af723faf143180a40ab5220f1b731.