question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Locale Contributions Wanted πŸ™‹πŸ™

See original GitHub issue

Release 1.6.2 was just published to the NPM with I18n support. Thanks again, everyone, for helping with this effort.

Day.js users come from all around the world, so I will happily accept translations from other languages for this project. And your work will affect thousands of daily users of Day.js.

Feel free to open a pull request if you’ve finished one of the three translations.

Locale (I18n)

Locale is the first translation work we need to do, and it will be released with our main code. Locale template

Readme file

Readme file let user get a glance of our project. And tells them what we are doing. If there is no sub pages’ translation, please keep the links in readme linked to English sub pages. Add a link to your translation in the default english readme file. Default English Readme

Sub pages of the document

Sub pages is the detailed documents of our project.

NOTE: It is welcome to put your language in the first place in locale example in files such as I18n.md. e.g. for Japanese docs

import 'dayjs/locale/ja'
// was import es in English ducoment
dayjs.locale('ja') // use Japanese locale globally 

Sub pages folder

Directory structure

Please place the translation files in a separate folder, and named with ISO 639-1 area code. Directory structure could be found below.

.
β”œβ”€β”€ docs
β”‚   └── es
β”‚        β”œβ”€β”€ API-reference.md
β”‚        β”œβ”€β”€ I18n.md
β”‚        β”œβ”€β”€ Installation.md
β”‚        β”œβ”€β”€ Plugin.md
β”‚        └── README-es.md
β”œβ”€β”€ src
β”‚   └── locale
β”‚        └── es.js
└── README.md  // default index english readme

Finally, thanks again for your contribution.

Append: We use ISO 639-2 country code. Check lists short codes for language here or here

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:20
  • Comments:19 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
iamkuncommented, May 24, 2018

Thanks, I’ve updated the .gitignore file, and it should be OK now.

1reaction
MartinDawsoncommented, Jun 7, 2018

At the moment dayjs only accepts language language code such as β€˜en’. Would be nice to accept formats like β€˜en-US’ instead of having dayjs fail later on.

The same as Moment.js Issue 422

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting a language with the full locale (e.g. en-us) should set ...
I'm writing a Chrome extension, so I don't mind that it's unsupported in IE. (Chrome, Safari, Gecko and Opera support is probably good...
Read more >
R Contributors (@R_Contributors) / Twitter
December Contributor Office Hours On the first Thursday, join an online Office Hour to - discuss how to get started contributing to R...
Read more >
How to contribute to article localization | Contributors Help
In case you see your language listed on the list of available locales you should click on the name of a Locale Leader...
Read more >
Contributing to Mobilizon
Our aim for this project is to make you feel welcome as a contributor. We hugely value the comments and contributions of community...
Read more >
Hope | Non Profit for Single Mom Families in ... - Instagram
πŸ‘‡To donate πŸ™ ... 15 $400 checks are being mailed out this week to local ... Want something to drool over AND make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found