Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

i18n - Try BCP47 codes, otherwise load family language if exist.#656

Merged
mmckegg merged 1 commit intomasterfrom
i18n-BCP47
Oct 28, 2017
Merged

i18n - Try BCP47 codes, otherwise load family language if exist.#656
mmckegg merged 1 commit intomasterfrom
i18n-BCP47

Conversation

@gmarcos87
Copy link
Contributor

Currently I was only using the first part of the language name (for example en-En -> en). Now try to find the translation corresponding to the full name and if you do not find it look for a "similar" one. If it does not find any, the system continues using English as the default language.

getSimilar( ['en', 'es', 'pt-BR'], 'pt-PT') ----> this return pt-BR

@gmarcos87 gmarcos87 mentioned this pull request Oct 26, 2017
@mmckegg mmckegg merged commit e56f598 into master Oct 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants