Comments (2)
Seems like it would be best to have holidays by region rather than language.
from holidays.
When fixing GitHawkApp/GitHawk#2560 I've read localization docs so the thing is that Locale.current.identifier
will be one of Locale.availableLocaleIdentifiers
and it will consist of: language code, often includes a region code, and occasionally a script designator.
Which means that if I have set a Portuguese language as a primary on my device and set Lithuania as my region Locale.current.identifier
will be equal to en_LT
.
Currently in GitHawk app case all identifiers will start w/ en_
Having that in mind there will be lots and lots of jsons which will be the same.
To come up w/ much more simple solution we should decide which is more important: language or region for inbox zero message:
- if language (i.e we'd like to greet people the language they prefer): I suggest taking first value from
Locale.preferredLanguages
which is a list of device languages; - if region (we'd like to greet people with holiday in region where they live/work): I suggest taking into account
Locale.current.regionCode
which is one ofLocale.isoRegionCodes
(255 values at the moment).
To sumarize Locale.current.identifier
does not give enough context if app language is not important.
I personally have my language set to English
& region to Lithuania
.
from holidays.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holidays.