From a3213b46f9ca2713f873324bb97655427c650dd3 Mon Sep 17 00:00:00 2001 From: Emruz Hossain Date: Sat, 11 May 2024 01:59:04 +0600 Subject: [PATCH] Fix language selector when default language is not English (#936) Signed-off-by: hossainemruz --- exampleSite/hugo.yaml | 10 +++++++--- layouts/partials/navigators/lang-selector.html | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 1db84ff..e604c33 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -33,14 +33,18 @@ module: # For any more details, you can check the official documentation: https://gohugo.io/content-management/multilingual/ languages: en: + languageCode: en languageName: English + title: "John's Blog" weight: 1 bn: + languageCode: bn languageName: বাংলা - weight: 3 + title: "জনের ব্লগ" + weight: 2 -# Force a locale to be use, really useful to develop the application ! Should be commented in production, the "weight" should rocks. -# DefaultContentLanguage: bn +# default language for the content +defaultContentLanguage: en # Allow raw html in markdown file markup: diff --git a/layouts/partials/navigators/lang-selector.html b/layouts/partials/navigators/lang-selector.html index 2f5c94c..264c9f4 100644 --- a/layouts/partials/navigators/lang-selector.html +++ b/layouts/partials/navigators/lang-selector.html @@ -12,7 +12,7 @@