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

Fallback is not working #39

Closed
jsakars opened this issue Nov 15, 2016 · 2 comments
Closed

Fallback is not working #39

jsakars opened this issue Nov 15, 2016 · 2 comments
Assignees
Milestone

Comments

@jsakars
Copy link

jsakars commented Nov 15, 2016

Take Your own example

var lang = new Lang({
    messages: {
        'en.greetings': {
            'hi': 'Hi',
            'hello': 'Hello'
        },
        'it.greetings': {
            'hi': 'Salve'
        }
    }
});

lang.setLocale('it');
lang.get('greetings.hello');
// > "greetings.hello"

lang.setFallback('en');
lang.get('greetings.hello');
// > "greetings.hello" instead of "Hello"
@rmariuzzo
Copy link
Owner

Wil check in a couple of mins...

On Nov 15, 2016 5:00 AM, "Jānis Šakars" notifications@github.com wrote:

Take Your own example https://github.com/rmariuzzo/Lang.js#setfallback

var lang = new Lang({
messages: {
'en.greetings': {
'hi': 'Hi',
'hello': 'Hello'
},
'it.greetings': {
'hi': 'Salve'
}
}
});

lang.setLocale('it');
lang.get('greetings.hello');
// > "greetings.hello"

lang.setFallback('en');
lang.get('greetings.hello');
// > "greetings.hello" instead of "Hello"


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#39, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa2H_An5HcxUKYMj4-RvqVw-uYA66yyks5q-XTIgaJpZM4KyRxu
.

@rmariuzzo rmariuzzo self-assigned this Nov 15, 2016
@rmariuzzo
Copy link
Owner

@werdlv thanks for your time on filing this issue. The fix was including in the last release: https://github.com/rmariuzzo/Lang.js/releases/tag/v1.1.5

👍

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