mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Localize menu items with translation tables
In the [Hugo documentation](https://gohugo.io/content-management/multilingual/#use-translation-tables) 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](https://gohugo.io/templates/menu-templates/#example). This change basically gives the same functionality to PaperMod.
This commit is contained in:
parent
9d4a9e825a
commit
709efac637
@ -130,7 +130,7 @@
|
||||
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
|
||||
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
|
||||
{{- .Pre }}
|
||||
{{- .Name -}}
|
||||
{{- or (T .Identifier) .Name -}}
|
||||
{{ .Post -}}
|
||||
</span>
|
||||
{{- if (findRE "://" .URL) }}
|
||||
|
Loading…
Reference in New Issue
Block a user