Skip to content
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

Site always shows English language independent of browser settings/weights #932

Closed
3 tasks done
tht opened this issue Apr 30, 2024 · 2 comments · Fixed by #936
Closed
3 tasks done

Site always shows English language independent of browser settings/weights #932

tht opened this issue Apr 30, 2024 · 2 comments · Fixed by #936

Comments

@tht
Copy link

tht commented Apr 30, 2024

Expected Behavior

When configuring mutliple languages with weights I expect to see the the language with the lowest weight when opening the webpage for the first time.

Configuration is as follows:

languageCode: de

# Manage languages
# For any more details, you can check the official documentation: https://gohugo.io/content-management/multilingual/
languages:
  de:
    languageName: Deutsch
    weight: 1
  en:
    languageName: English
    weight: 3

# Force a locale to be use, really useful to develop the application ! Should be commented in production, the "weight" should rocks.
#DefaultContentLanguage: de

I've also tested languageCode: de-ch. Same effect.

The only way to make sure the page opens in German is to use DefaultContentLanguage which triggers the issue #916.

Current Behavior

When visiting the site I always see the english language. Also english is deployed to the site root, additional languages are deployed to a sub-directory.

Possible Solution

Steps to Reproduce

(See configuration snippet above)

Screenshots

(none)

Browsers Affected

  • Chrome
  • Edge
  • Safari 17

Detailed Description

English seems to be hardcoded as default language on the root dir. Maybe slightly related to #916.

@hossainemruz
Copy link
Member

The issue should be fixed now. Please, try pulling the latest change. Specify defaultContentLanguage to your default language.

@tht
Copy link
Author

tht commented May 11, 2024

Works for me, thanks a lot for looking into it and also for this lovely theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants