Skip to content
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

allow fallbackLng as function #1508

Merged
merged 3 commits into from
Oct 2, 2020
Merged

allow fallbackLng as function #1508

merged 3 commits into from
Oct 2, 2020

Conversation

markdon
Copy link
Contributor

@markdon markdon commented Oct 1, 2020

Enables a function to be specified for fallbackLng. Discussed as a solution to #1506. This function can return either of the other existing types: string, array or object.

I felt like I was adding a lot of code to test this small feature, but a smarter way to test this hasn't come to me yet.

Checklist says this will want documentation 🤔 Coming soon I think.

Checklist

@coveralls
Copy link

coveralls commented Oct 1, 2020

Coverage Status

Coverage increased (+0.007%) to 92.982% when pulling 9f53732 on markdon:master into ee7d49d on i18next:master.

@adrai
Copy link
Member

adrai commented Oct 1, 2020

Can you extend the types? https://github.com/i18next/i18next/blob/master/index.d.ts#L5

index.d.ts Outdated Show resolved Hide resolved
@markdon
Copy link
Contributor Author

markdon commented Oct 1, 2020

Documentation on i18next/i18next-gitbook#140

@jamuhl jamuhl self-requested a review October 2, 2020 08:16
@adrai
Copy link
Member

adrai commented Oct 2, 2020

lgtm

@jamuhl jamuhl merged commit be8d2bb into i18next:master Oct 2, 2020
@jamuhl
Copy link
Member

jamuhl commented Oct 2, 2020

thank you for the complete PR (even including docs 👍)

was published in i18next@19.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants