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
Date.Format Internationalization #245
Comments
The standard Go time package don't have internationalization built in. You can see the list of month names that Go is aware of here, and they're all English. The easiest solution would probably be to display the months as numbers instead. |
For this we use two different packages. The go standard date library and cast Since neither support what you are looking for, I'm going to close this for now. The right answer is for someone to extend the standard date library to support this. |
A hint for those who would like to solve the problem with Javascript : you can use the Moment.js library to format/localize your dates. |
Hi, there. I wrote a general-purpose package, called lctime, that might be able to fix this issue. It uses locales and I was thinking this issue could be easily solved if we could add
The default locale is based on environment variables. However, if people want to change the locale, they can start Hugo like this.
Or maybe they could add a Let me know if this is something that sounds interesting. I wouldn't mind opening a PR. Happy holidays! 🎄 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
Maybe I don't understand well the logic of the .Date.Format variable, but it's possible to change the language of the months (for example) when they are displayed?
Something like {{ .Date.Format.IT "30 marzo 2006" }}
The text was updated successfully, but these errors were encountered: