Default to EN page if a translation is not available #170

Open
opened 2017-09-20 10:26:52 +00:00 by max.mehl · 2 comments
Owner

Currently, a language version needs to be complete in order to not break relative links. Hugo only builds pages for existing files in the respective language folders in public (e.g. /fr, /el)

It would be better if we had a system like with fsfe.org where a non-existent translation always shows the EN version instead of a 404 error

I'm not sure we'll find a way to do this on our own, or whether we have to ask upstream.

Currently, a language version needs to be complete in order to not break relative links. Hugo only builds pages for existing files in the respective language folders in `public` (e.g. /fr, /el) It would be better if we had a system like with fsfe.org where a non-existent translation always shows the EN version instead of a 404 error I'm not sure we'll find a way to do this on our own, or whether we have to ask upstream.
max.mehl added the
help wanted
hugo/go
labels 2017-09-20 10:26:52 +00:00
Author
Owner

If it is not possible with Hugo, we could do this on a webserver basis. If there is a 404, the webserver should check whether there the file is available in the default (EN) version and redirect to that.

If it is not possible with Hugo, we could do this on a webserver basis. If there is a 404, the webserver should check whether there the file is available in the default (EN) version and redirect to that.
max.mehl removed the due date 0001-01-01 2018-09-28 11:58:06 +00:00
Author
Owner

Gitea has an interesting script to deal with that: https://gitea.com/gitea/website/src/branch/master/scripts/trans-copy

Gitea has an interesting script to deal with that: https://gitea.com/gitea/website/src/branch/master/scripts/trans-copy
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pmpc/website#170
No description provided.