hugo-PaperMod
hugo-PaperMod copied to clipboard
Localize menu items with translation tables
What does this PR change? What problem does it solve?
In the Hugo documentation it explains using translation tables as a possible way of localizing menu entries.
This basically uses the menu identifier as a language key for the name of the entry, and is present in the example menu template.
This change basically gives the same functionality to PaperMod.
Was the change discussed in an issue or in the Discussions before?
Not really. I searched for it and was going to ask. But the change is so minuscule that I thought opening the PR would be easier (and if there's a discussion it can happen anyway here).
PR Checklist
- [ ] This change adds/updates translations and I have used the template present here.
- [x] I have enabled maintainer edits for this PR.
- [x] I have verified that the code works as described/as intended.
- [ ] This change adds a Social Icon which has a permissive license to use it.
- [x] This change does not include any CDN resources/links.
- [x] This change does not include any unrelated scripts such as bash and python scripts.
- [ ] This change updates the overridden internal templates from HUGO's repository.
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Adding menu translations at translation tables and rest of config in config.yml may have very less use cases. Instead we are adding them to config itself like this:
https://github.com/adityatelange/hugo-PaperMod/blob/4bdc993b98cc82d1c59efca0774f85811b0bf213/config.yml#L22-L67