-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Multilanguage support with example included and language selector in … #127
Conversation
✅ Deploy Preview for hugo-blog-awesome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This PR exceeds the recommended size of 300 lines (counting both additions & deletions). Kindly ensure that you are NOT addressing multiple issues in one PR. We recommend you to create atomic PRs which focus on a single change. |
This PR exceeds the recommended size of 300 lines (counting both additions & deletions). Kindly ensure that you are NOT addressing multiple issues in one PR. We recommend you to create atomic PRs which focus on a single change. |
This PR exceeds the recommended size of 300 lines (counting both additions & deletions). Kindly ensure that you are NOT addressing multiple issues in one PR. We recommend you to create atomic PRs which focus on a single change. |
This PR exceeds the recommended size of 300 lines (counting both additions & deletions). Kindly ensure that you are NOT addressing multiple issues in one PR. We recommend you to create atomic PRs which focus on a single change. |
This PR exceeds the recommended size of 300 lines (counting both additions & deletions). Kindly ensure that you are NOT addressing multiple issues in one PR. We recommend you to create atomic PRs which focus on a single change. |
This PR exceeds the recommended size of 300 lines (counting both additions & deletions). Kindly ensure that you are NOT addressing multiple issues in one PR. We recommend you to create atomic PRs which focus on a single change. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@fmaida, thanks for the hard work. Let me know if you are planning to push some more commits, otherwise I will review and merge this PR. Please don't worry about the automated warning about exceeding recommended size of 300 lines. |
@hugo-sid I think I've made all the changes I needed, you can proceed if you want. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fmaida,thanks for implementing multilanguage support with example content and language selector.
I appreciate your contribution to Hugo blog awesome theme.
Thanks for the detailed description in this PR. I will include as documentation for this feature.
Is this PR adding a new feature?
This PR implements multi language support to the theme.
At the moment only English and Italian are supported, but if you want to add new languages simply copy i18n/en-gb.yaml, and save it with the language code of the new language you want to add (for example: "fr" or "fr-fr" for French).
Then, in the
config.toml
or in thehugo.toml
toml file in the root folder, copy and paste the entire Languages.en node and change every recurrence of "language.en" withLanguage.<your_language_code>
. For example, to add a French translation, change it toLanguage.fr
orLanguage.fr-fr
.Finally, in the
content
folder, create a new sub-folder with the same name of your language code (it's not mandatory, but IMHO it's makes your life easier to remember what each folder contains). So, for example if you're adding French to your website, create a folder namedfr
orfr-fr
.For example, this is taken out straight from the example
config.toml
file insideexampleSite
folder:Is this PR related to any issue or discussion?
Please see discussion #118
PR Checklist