-
Notifications
You must be signed in to change notification settings - Fork 358
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
Add internationalisation (see Hugo Learn Theme for reference) #24
Comments
Hello, do you have any news on this ? |
@GaetanBt I believe (but may be mistaken) that this is supported already from core Hugo. See https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/ |
Thanks for the link @Heydon, i'm new to Hugo ! Yeah it seems that it has a built in support for internationalisation. I was more thinking about a way to provide translations of the hard-written content inside the theme. Maybe i'm missing a point somewhere but if you think it can be a good idea, I would be happy to help and work on French translations. |
@GaetanBt Ah, I see what you mean. Good question (and thanks for offering to help). I'll try to find time to look into it. Let me know if you have any ideas. |
I drop some ideas, First of all I just figured out that the language code set in the Maybe we can start by using it like I don't know if we are allowed to create directories and files in a Hugo theme but we could store translations in a specific To organise the translations we could prefix each key by the subject of the concerned file. For example : {
"shortcodes-warning-ariaLabel": "warning",
"layout-skipToContent": "skip to content",
"layout-printVersion": "Print version",
"layout-darkTheme": "dark theme"
} Or maybe we could split this in multiple files depending on the subject :
Or even filter like this :
|
The Hugo Learn Theme has internationalisation by default. This would be a valuable addition to Cupper.
Reference: https://learn.netlify.com/en/
Source: https://github.com/matcornic/hugo-theme-learn
The text was updated successfully, but these errors were encountered: