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

Implement fallback #10

Closed
rmariuzzo opened this issue Aug 22, 2015 · 1 comment
Closed

Implement fallback #10

rmariuzzo opened this issue Aug 22, 2015 · 1 comment
Milestone

Comments

@rmariuzzo
Copy link
Owner

Summary

As a user, if I try to get('welcome') with the locale set to ‘es’ and there's no message in Spanish (es) but it exists in English (en) then I would like the get method to return the message in the “fallback” locale (in this case English).

Description

We want to implement both getter and setter methods to interact with the “fallback”:

Also, we want to take in account of the fallback value when executing get(), trans() and choice().

Tests

Tests needs to be created to cover the fallback feature.

@rmariuzzo rmariuzzo added this to the v1.1.0 milestone Aug 22, 2015
nivla added a commit to nivla/Lang.js that referenced this issue Aug 23, 2015
Introduce setFallback/getFallback methods which will be used when the active language does not contain a given language line.
@nivla nivla mentioned this issue Aug 23, 2015
@matthew-sycle
Copy link

Hi! Do you have any idea when the v1.1.0 will be released? We need this fallback feature for our Laravel app, but we avoid pulling from non-release repos when possible. Thanks!

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

No branches or pull requests

2 participants