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

Translation for static text #9

Open
tomfran opened this issue Jul 18, 2024 · 4 comments
Open

Translation for static text #9

tomfran opened this issue Jul 18, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@tomfran
Copy link
Owner

tomfran commented Jul 18, 2024

Motivation

As of now, all the static text in the theme is in English. Having different translations would be better for non-english websites.

The static text include:

  • Footer
  • Home string in breadcrumbs
  • Dates
  • Reading time
  • Back to top

Wanted result

I don't like the idea of a translation menu for Typo, but I want people to be able to specify a language in their config to use.

The expected result would be something like:

hugo.toml

[params]
language = 'en | it | de | ...'

With the website using the appropriate strings for this set language.

Ref: https://gohugo.io/content-management/multilingual/

@tomfran tomfran added the enhancement New feature or request label Jul 18, 2024
@kyagi
Copy link

kyagi commented Jul 18, 2024

If you need a Japanese translation, it will be

  • フッタ or フッター
  • パンくずリスト or パス
    • If you refer to the path(a series of directory/file name from the content root), IMHO, they might not need to be translated. I think most users adopt English in their directory/file name.
  • 日付 or 日時
  • 読み終えるまで or リーディングタイム
  • トップに戻る

Have a nice day! :-)

@zeeshanthedev590
Copy link

so basically there should be a way to translate the text , given that the developer writes it in english?

@jpvg10
Copy link
Contributor

jpvg10 commented Nov 18, 2024

I created a little PR (#50) to add translation for dates.

Not sure what's the best way to go for the others, but maybe translation tables? Or maybe even data sources.

@runofthemillgeek
Copy link
Contributor

@jpvg10 translation tables looks like the right approach given what @tomfran also mentioned for other hardcoded static text in the template.

I'm interested in having good localization support for this theme too as I intend to have a separate section for Japanese posts next year to help with my learning. Would be nice to see Typo all ready for it before that :)

Hugo also has support for multilingual mode but IDK if that needs additional work.

For now this issue can be scoped for supporting translations when choosing the default site language.

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

No branches or pull requests

5 participants