Closed ellypsis closed 3 years ago
Hi @ellypsis. You can do your date translation work by overriding this template file
Thank you for your quick answer. I didn't know (read enough...) I could do that! I founded the right file to modify but didn't know how to do it. Finally made it works.
<div class="date">
<strong>{{ T "publish_date" }} </strong>{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}
{{ with .Lastmod }}
{{ if gt . $publishDate }}
<br>
<strong>{{ T "last_updated" }} </strong>{{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }}
{{ end }}
{{ end }}
</div>
You did a really great work with this forked theme. Really like it :+1:
Glad to hear you found a solution. And thank you for the kind words
Is your feature request related to a problem? Please describe. I'm trying to use this method to translate months.
Describe the solution you'd like How to incorporate this solution in the template? Can I use a solution without modification on theme files? (update in mind)
Describe alternatives you've considered Incorporate a translation method with i18n config for time-date translation, as Go doesn't support it yet
Additional context I'm still a newbie in coding, but have some knowledge. Thanks for helping me!