-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I18n #34
Comments
@cullophid What about i18n support? |
I think we could create a function called const format = formatWithLocale(DEFAULT_LOCALE) With this approach, I could create formatters with any locale: import { formatWithLocale } from 'date-fp'
// I can define my own locale
const LOCALE_PT_BR = {
MONTHS: ...,
WEEKDAYS: ...,
...
}
export const formatPtBr = formatWithLocale(LOCALE_PT_BR) It would be nice to have some locales available in the package too: import { formatWithLocale } from 'date-fp'
import LOCALE_PT_BR from 'date-fp/locales/pt-br'
export const formatPtBr = formatWithLocale(LOCALE_PT_BR) @cullophid, what you think? |
That sounds like a great idea! |
IMO the library should stay as it is, or expand but leaving i18n outside of the movie as that can be handled by Intl.DateTimeFormat. |
Add simple i18n support
The text was updated successfully, but these errors were encountered: