Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

Support CP 47 subtag that are not defined #274

Open
googol7 opened this issue Nov 27, 2017 · 0 comments
Open

Support CP 47 subtag that are not defined #274

googol7 opened this issue Nov 27, 2017 · 0 comments

Comments

@googol7
Copy link

googol7 commented Nov 27, 2017

E.g.: fr-CH is not defined but fr-FR is so take fr-FR instead

var lang = 'en_us';
if (ath.language) {
    if (ath.language in ath.intl) {
        lang = ath.language
    } else if (ath.language.substr(0, 2) in ath.intl) {
        lang = ath.language.substr(0, 2)
    }
}
ath.language = lang
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant