hugo-theme-meme icon indicating copy to clipboard operation
hugo-theme-meme copied to clipboard

feat: support `i18nMonth` for date in list item

Open hucste opened this issue 4 years ago • 2 comments

if i18n exists, the month into this list item is not correctly displayed. Actually, only in english. With this fixe, month is displayed segun language code.

hucste avatar Aug 05 '20 18:08 hucste

So as the comment in config.toml,

https://github.com/reuixiy/hugo-theme-meme/blob/a7c47aa5f4f33373068a24fb9f735a2b8dfee501/config-examples/en/config.toml#L449-L450

I don't think this is a bug. Though, it could be an enhancement.

Also, in your code, if i18nMonth is enabled, then the listDateFormat will not be respected -- it's hard-coded to "January 2" format. But there are many different date formats in different countries, see:

  • https://en.wikipedia.org/wiki/Date_format_by_country
  • https://gohugo.io/functions/format/

In other words, the character is i18ned but the format is not, or is destroyed.

reuixiy avatar Aug 08 '20 06:08 reuixiy

Ok, I understand the problem. For the moment, I don't known how fix it. but you have to admit that having the dates, once in FR (or other lang), once in EN, so sucks. :( (I thought I'd come up with a solution and move things along...)

hucste avatar Aug 08 '20 07:08 hucste