rmariuzzo/Lang.js

Implement fallback

Closed this issue · 1 comments

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.

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!