Closed EmilePerron closed 1 year ago
The more I think about it, the more I think this isn't the package's responsibility. The package has no way of knowing if the fallback locale has already been loaded in a different script or not.
Going to close this issue - sorry for the disturbance!
In the current version, when a fallback locale is defined, it isn't loaded automatically (as explained in #307).
That means you still have to specifically request that the fallback be loaded, which is inconvenient and often forgotten.
This commit updates the
getLocales()
method to ensure the fallback translations are always loaded when a fallback locale is defined.Here's a comparison in the case of a project with the
fr_CA
as the default locale andfr
as the fallback locale (with only one message, in order to keep things simple).Before:
After:
Closes #307