-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support for rfc 5646 #572
Comments
Happy to accept a PR 😄 |
How could this be done without having a complete list of languages in the library? |
@jsamr - you can help here? |
@profnandaa Sorry don't have the time for this. Perhaps later this year. |
No worries :)
On Tue, Sep 25, 2018 at 4:45 PM Jules Sam. Randolph < ***@***.***> wrote:
@profnandaa <https://github.com/ProfNandaa> Sorry don't have the time for
this. Perhaps later this year.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#572 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAP8kaxnxO3hdm3b58wCMYQjklSU8Mjcks5uejNtgaJpZM4JqX8e>
.
--
Sent from a tiny device while on the move.
|
Like the question from @Haroenv, we do need a complete list of IANA Language Tags. I propose this: import tags from 'language-tags';
// Reference: https://tools.ietf.org/html/rfc5646
export default function isLanguageTag(str, options) {
assertString(str);
return tags.check(str)
} Step 3. Add some tests from RFC 5646. |
the project you linked still uses a full list of all languages, here: https://github.com/mattcg/language-subtag-registry |
Similarly to
isISO8601
,isRFC5646
will check if the givenstring
param complies with the rfc 5646 standard for localisation tags (ex:fr-CA
).The text was updated successfully, but these errors were encountered: