Skip to content

Make time.Format localized #8797

@bep

Description

@bep

https://github.com/go-playground/locales

It looks beautifully complete, and has a lot of the stuff that many people ask about, esp. date formatting:

https://github.com/go-playground/locales/blob/master/rules.go#L45

Not sure how to go about with this (esp. considering go-i18n, but I suspect we can take this in 2 round), but one should be able to do something ala:

Week day: {{ site.Language.Translator.WeekDayShort .Date }}

Translator ...?

/cc @jmooring @regisphilibert

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions