okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
251 stars 133 forks source link

Problem withe setting up default language in multilingual #849

Open cjmym8 opened 3 years ago

cjmym8 commented 3 years ago

Hello,

I've got a problem with default site in multilingual mode. I've got my site in 2 languages, english and polish, and I have content in 2 directories. I want to set polish as a default language, so I've set parameter defaultContentLanguage = "pl" both in site settings and params. When set only in site settings, it simply does nothing. When set in params, english version still appears on main site, but after clicking both 'pl' or 'en' button, it switches to polish. Is there anything I'm doing wrong, or is there any fix/workaround? I tried redirecting from main page to /pl folder, but as I read in documentation later, gitlab doesn't support redirections if the site exists, so basicaly there is no way to redirect from the home page (as far as I understand). Syna version 0.16.1, Hugo latest extended (0.81.0)

Here is part of my config.toml

`version = "0.16.1" defaultContentLanguage = "pl" # used for file names defaultContentLanguageInSubdir = true

[languages] [languages.pl] title = "Omex" weight = 1 contentDir = "content/pl" languageName = "Polski"

[languages.en] title = "Omex" weight = 2 contentDir = "content/en" languageName = "English"

[params] defaultContentLanguage = "pl"`

Any help would be apriciated.

stp-ip commented 3 years ago

I'll do my best to take a look, but currently swamped with other things so might take a bit.

aliberkhsl commented 3 years ago

Have same issue also

cjmym8 commented 3 years ago

Hi, are there any updates on my issue?