iamkun / iamkun/dayjs

Question - How one can change locale dynamically?

Open
#2,284 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I want my user to change the language in the app dynamically, based on a list of supported languages in a, say... dropdown list.

How could I achieve that with `dayjs`, seeing like I have to explicitly import every needed locale.
Do I have to manually import all of my app's supported locales in `dayjs` init routine?

Contributor guide

Open the contributing guide

Research direction

No repository files or tests are named. Start by reviewing Day.js locale-loading and locale-switching documentation or entry points; done means providing a clear answer about dynamically selecting a locale and whether supported locales must be imported manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
internationalization, localization
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.