Merge pull request #44869 from dipesh-rawat/sort-language-dropdown
Enhance language dropdown ordering
This commit is contained in:
commit
cb2f55e883
|
|
@ -187,8 +187,11 @@ script and use it in the theme. Assign "language name in latin script" to
|
|||
`languageNameLatinScript`. For example, `languageNameLatinScript ="Korean"` or
|
||||
`languageNameLatinScript = "Deutsch"`.
|
||||
|
||||
When assigning a `weight` parameter for your block, find the language block with
|
||||
the highest weight and add 1 to that value.
|
||||
The `weight` parameter determines the order of languages in the language selection bar.
|
||||
A lower weight takes precedence, resulting in the language appearing first.
|
||||
When assigning the `weight` parameter, it is important to examine the existing languages
|
||||
block and adjust their weights to ensure they are in a sorted order relative to all languages,
|
||||
including any newly added language.
|
||||
|
||||
For more information about Hugo's multilingual support, see
|
||||
"[Multilingual Mode](https://gohugo.io/content-management/multilingual/)".
|
||||
|
|
|
|||
202
hugo.toml
202
hugo.toml
|
|
@ -318,36 +318,10 @@ language_alternatives = ["en"]
|
|||
languageNameLatinScript = "Chinese"
|
||||
description = "生产级别的容器编排系统"
|
||||
|
||||
[languages.ko]
|
||||
title = "Kubernetes"
|
||||
languageName = "한국어 (Korean)"
|
||||
weight = 3
|
||||
contentDir = "content/ko"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.ko.params]
|
||||
time_format_blog = "2006.01.02"
|
||||
language_alternatives = ["en"]
|
||||
description = "운영 수준의 컨테이너 오케스트레이션"
|
||||
languageNameLatinScript = "Korean"
|
||||
|
||||
[languages.ja]
|
||||
title = "Kubernetes"
|
||||
languageName = "日本語 (Japanese)"
|
||||
weight = 4
|
||||
contentDir = "content/ja"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.ja.params]
|
||||
time_format_blog = "2006.01.02"
|
||||
language_alternatives = ["en"]
|
||||
languageNameLatinScript = "Japanese"
|
||||
description = "プロダクショングレードのコンテナ管理基盤"
|
||||
|
||||
[languages.fr]
|
||||
title = "Kubernetes"
|
||||
languageName = "Français (French)"
|
||||
weight = 5
|
||||
weight = 3
|
||||
contentDir = "content/fr"
|
||||
languagedirection = "ltr"
|
||||
|
||||
|
|
@ -358,10 +332,52 @@ language_alternatives = ["en"]
|
|||
description = "Solution professionnelle d’orchestration de conteneurs"
|
||||
languageNameLatinScript = "Français"
|
||||
|
||||
[languages.de]
|
||||
title = "Kubernetes"
|
||||
languageName = "Deutsch (German)"
|
||||
weight = 4
|
||||
contentDir = "content/de"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.de.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "Produktionsreife Container-Orchestrierung"
|
||||
languageNameLatinScript = "Deutsch"
|
||||
|
||||
[languages.hi]
|
||||
title = "Kubernetes"
|
||||
languageName = "हिन्दी (Hindi)"
|
||||
weight = 5
|
||||
contentDir = "content/hi"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.hi.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "प्रोडक्शन-ग्रेड कंटेनर ऑर्केस्ट्रेशन"
|
||||
languageNameLatinScript = "Hindi"
|
||||
|
||||
[languages.id]
|
||||
title = "Kubernetes"
|
||||
languageName ="Bahasa Indonesia (Indonesian)"
|
||||
weight = 6
|
||||
contentDir = "content/id"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.id.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "Orkestrasi Kontainer dengan Skala Produksi"
|
||||
languageNameLatinScript = "Bahasa Indonesia"
|
||||
|
||||
[languages.it]
|
||||
title = "Kubernetes"
|
||||
languageName = "Italiano (Italian)"
|
||||
weight = 6
|
||||
weight = 7
|
||||
contentDir = "content/it"
|
||||
languagedirection = "ltr"
|
||||
|
||||
|
|
@ -372,6 +388,27 @@ language_alternatives = ["en"]
|
|||
description = "Orchestrazione di Container in produzione"
|
||||
languageNameLatinScript = "Italiano"
|
||||
|
||||
[languages.ja]
|
||||
title = "Kubernetes"
|
||||
languageName = "日本語 (Japanese)"
|
||||
weight = 8
|
||||
contentDir = "content/ja"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.ja.params]
|
||||
time_format_blog = "2006.01.02"
|
||||
language_alternatives = ["en"]
|
||||
languageNameLatinScript = "Japanese"
|
||||
description = "プロダクショングレードのコンテナ管理基盤"
|
||||
|
||||
[languages.ko]
|
||||
title = "Kubernetes"
|
||||
languageName = "한국어 (Korean)"
|
||||
weight = 9
|
||||
contentDir = "content/ko"
|
||||
languagedirection = "ltr"
|
||||
|
||||
# 'Norsk (Norwegian)' language is disabled via 'disableLanguages' config.
|
||||
[languages.no]
|
||||
title = "Kubernetes"
|
||||
languageName = "Norsk (Norwegian)"
|
||||
|
|
@ -386,38 +423,30 @@ language_alternatives = ["en"]
|
|||
description = "Production-Grade Container Orchestration"
|
||||
languageNameLatinScript = "Norsk"
|
||||
|
||||
[languages.de]
|
||||
[languages.ko.params]
|
||||
time_format_blog = "2006.01.02"
|
||||
language_alternatives = ["en"]
|
||||
description = "운영 수준의 컨테이너 오케스트레이션"
|
||||
languageNameLatinScript = "Korean"
|
||||
|
||||
[languages.pl]
|
||||
title = "Kubernetes"
|
||||
languageName = "Deutsch (German)"
|
||||
weight = 8
|
||||
contentDir = "content/de"
|
||||
languageName = "Polski (Polish)"
|
||||
weight = 10
|
||||
contentDir = "content/pl"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.de.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
[languages.pl.params]
|
||||
time_format_blog = "01.02.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "Produktionsreife Container-Orchestrierung"
|
||||
languageNameLatinScript = "Deutsch"
|
||||
|
||||
[languages.es]
|
||||
title = "Kubernetes"
|
||||
languageName = "Español (Spanish)"
|
||||
weight = 9
|
||||
contentDir = "content/es"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.es.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "Orquestación de contenedores para producción"
|
||||
languageNameLatinScript = "Español"
|
||||
description = "Produkcyjny system zarządzania kontenerami"
|
||||
languageNameLatinScript = "Polski"
|
||||
|
||||
[languages.pt-br]
|
||||
title = "Kubernetes"
|
||||
languageName = "Português (Portuguese)"
|
||||
weight = 10
|
||||
weight = 11
|
||||
|
||||
contentDir = "content/pt-br"
|
||||
languagedirection = "ltr"
|
||||
|
|
@ -429,49 +458,10 @@ language_alternatives = ["en"]
|
|||
description = "Orquestração de contêineres em nível de produção"
|
||||
languageNameLatinScript = "Português"
|
||||
|
||||
[languages.id]
|
||||
title = "Kubernetes"
|
||||
languageName ="Bahasa Indonesia"
|
||||
weight = 11
|
||||
contentDir = "content/id"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.id.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "Orkestrasi Kontainer dengan Skala Produksi"
|
||||
languageNameLatinScript = "Bahasa Indonesia"
|
||||
|
||||
[languages.hi]
|
||||
title = "Kubernetes"
|
||||
languageName = "हिन्दी (Hindi)"
|
||||
weight = 12
|
||||
contentDir = "content/hi"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.hi.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "प्रोडक्शन-ग्रेड कंटेनर ऑर्केस्ट्रेशन"
|
||||
languageNameLatinScript = "Hindi"
|
||||
|
||||
[languages.vi]
|
||||
title = "Kubernetes"
|
||||
languageName = "Tiếng Việt (Vietnamese)"
|
||||
contentDir = "content/vi"
|
||||
weight = 13
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.vi.params]
|
||||
languageNameLatinScript = "Tiếng Việt"
|
||||
description = "Giải pháp điều phối container trong môi trường production"
|
||||
|
||||
[languages.ru]
|
||||
title = "Kubernetes"
|
||||
languageName = "Русский (Russian)"
|
||||
weight = 14
|
||||
weight = 12
|
||||
contentDir = "content/ru"
|
||||
languagedirection = "ltr"
|
||||
|
||||
|
|
@ -482,24 +472,24 @@ language_alternatives = ["en"]
|
|||
description = "Первоклассная оркестрация контейнеров"
|
||||
languageNameLatinScript = "Russian"
|
||||
|
||||
[languages.pl]
|
||||
[languages.es]
|
||||
title = "Kubernetes"
|
||||
languageName = "Polski (Polish)"
|
||||
weight = 15
|
||||
contentDir = "content/pl"
|
||||
languageName = "Español (Spanish)"
|
||||
weight = 13
|
||||
contentDir = "content/es"
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.pl.params]
|
||||
time_format_blog = "01.02.2006"
|
||||
[languages.es.params]
|
||||
time_format_blog = "02.01.2006"
|
||||
# A list of language codes to look for untranslated content, ordered from left to right.
|
||||
language_alternatives = ["en"]
|
||||
description = "Produkcyjny system zarządzania kontenerami"
|
||||
languageNameLatinScript = "Polski"
|
||||
description = "Orquestación de contenedores para producción"
|
||||
languageNameLatinScript = "Español"
|
||||
|
||||
[languages.uk]
|
||||
title = "Kubernetes"
|
||||
languageName = "Українська (Ukrainian)"
|
||||
weight = 16
|
||||
weight = 14
|
||||
contentDir = "content/uk"
|
||||
languagedirection = "ltr"
|
||||
|
||||
|
|
@ -509,3 +499,15 @@ time_format_blog = "02.01.2006"
|
|||
language_alternatives = ["en"]
|
||||
description = "Довершена система оркестрації контейнерів"
|
||||
languageNameLatinScript = "Ukrainian"
|
||||
|
||||
[languages.vi]
|
||||
title = "Kubernetes"
|
||||
languageName = "Tiếng Việt (Vietnamese)"
|
||||
contentDir = "content/vi"
|
||||
weight = 15
|
||||
languagedirection = "ltr"
|
||||
|
||||
[languages.vi.params]
|
||||
languageNameLatinScript = "Tiếng Việt"
|
||||
description = "Giải pháp điều phối container trong môi trường production"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue