azuyalabs / yasumi

The easy PHP Library for calculating holidays
https://www.yasumi.dev
Other
1.04k stars 152 forks source link

Use fallback from DEFAULT_LANGUAGE to 'en' #183

Closed c960657 closed 4 years ago

c960657 commented 4 years ago

With the changes in #176, most translations for en_US have been replaces with a generic en translation.

The fallback to the parent locale works fine for providers created with en_US as display locale. But for providers with other locales (such as it_IT), the fallback to DEFAULT_LANGUAGE (if no Italian translation exists) only looks for a en_US and not the parent locale.

In other words, the lookup priority should be this: it_ITiten_USenshortName

But currently it is only this: it_ITiten_USshortName