8000 Update subitems helper to fix multilingual issue by mpourismaiel · Pull Request #800 · okkur/syna · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update subitems helper to fix multilingual issue #800

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

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

mpourismaiel
Copy link
Member

What this PR does / why we need it:
subitems helper didn't identify page resources correctly in multilingual websites. The problem appeared in not default language pages.

Which issue this PR fixes:
fixes #799

Release note:

- Fix multilingual pages not showing subitems of fragments in non default language page

@stp-ip
Copy link
Member
stp-ip commented Jul 15, 2020

So what various ways of multilingual config work here?
faq.<lang>.md + faq/column1.<lang>.md
but not
faq.<lang>.md + faq.<lang>/column1.md

Do we wanna be specific with each column having the language or the subdirectory? What do you think?
Also needs better docs on how to do this or?

@mpourismaiel
Copy link
Member Author

faq/index.<lang>.md + faq/column1.<lang>.md and faq.<lang>.md + faq.<lang>/column1.<lang>.md work. The best description I can come up with is that Hugo uses the language specific files in non default languages and assumes all other files and pages to be specific to the default language. In other words, user should create each page and resource for each language if they want that file or page to be available in that language. You can have pages for a language but not for the other and you can have pages for both languages, and the naming convention assumes pages without .<lang> to belong to the default language.

Definitely requires more documentation since I seem to forget this everytime I create multilingual websites.

Language directories are used for this very purpose but implementing them and not breaking most of our code is a challenge. I'll approach it some other time but can't think of a solution for it now.

@stp-ip
Copy link
Member
stp-ip commented Jul 15, 2020

Ok let's create an issue to get this documented.

Thanks for reminding me that the language directories is still on our radar, but not implemented.

lgtm

@stp-ip stp-ip merged commit 8976bf0 into okkur:master Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Multilingual mode and page of type : items / faq
2 participants
0