Skip to content
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

Feature Request: i18n support #477

Open
scholar7r opened this issue Sep 2, 2024 · 6 comments
Open

Feature Request: i18n support #477

scholar7r opened this issue Sep 2, 2024 · 6 comments

Comments

@scholar7r
Copy link

Terminal theme is really good, but i18n can make this theme more popular.

Yes! We need i18n!

@panr
Copy link
Owner

panr commented Sep 2, 2024

Hey, @scholar7r! i18n is supported since it's Hugo's "native" feature. If you mean that I should replace language variables from config file, then yes. I should, and will soon ;-)

@scholar7r
Copy link
Author

Oops...

I was trying to find out i18n folder but got nothing here. So I didn't check the configuration file.

It's really a cool theme that I have seen. When I have time I have to make it as my hugo site theme.

@sardarms
Copy link

@panr regarding the i18n support, what I have realised is that stating language does not change the date in the local language. For that I have to change the following code:

{{- .Date.Format "2006-01-02" -}}

into this code:

{{- .Date | time.Format ":date_medium" -}}

I have to do this everywhere i.e. list, default, terms, etc.

For reference you can see it here - https://gohugo.io/content-management/multilingual/#dates

Can you please take a look and update the files if required?

@KatieTheDev
Copy link
Contributor

In issue #493 I have made a suggestion I believe to be in a similar vein - I would like to make timestamps more customizable. I have set up my site to have timestamps with the {{- .Date | time.Format ":time_long" -}} function of Hugo. If you like, I would be happy to incorporate your feature into a potential PR if the community is interested in these features.

@KatieTheDev
Copy link
Contributor

@panr regarding the i18n support, what I have realised is that stating language does not change the date in the local language. For that I have to change the following code:

{{- .Date.Format "2006-01-02" -}}

into this code:

{{- .Date | time.Format ":date_medium" -}}

I have to do this everywhere i.e. list, default, terms, etc.

For reference you can see it here - https://gohugo.io/content-management/multilingual/#dates

Can you please take a look and update the files if required?

Sorry, meant to post my above reply in reference to this comment.

@KatieTheDev
Copy link
Contributor

regarding the i18n support, what I have realised is that stating language does not change the date in the local language. For that I have to change the following code:

{{- .Date.Format "2006-01-02" -}}

into this code:

{{- .Date | time.Format ":date_medium" -}}

I have to do this everywhere i.e. list, default, terms, etc.

For reference you can see it here - https://gohugo.io/content-management/multilingual/#dates

Can you please take a look and update the files if required?

@sardarms I have implemented this in PR #494. Please leave any feedback on my implementation in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants