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

Language support for 403,503,404 #7966

Open
Blackswirllife opened this issue May 8, 2022 · 3 comments
Open

Language support for 403,503,404 #7966

Blackswirllife opened this issue May 8, 2022 · 3 comments

Comments

@Blackswirllife
Copy link

Hey :)

Would it be possible to get language support for the 403 503 404 pages as well?

If I create a 404 page under Blocks and change the language it stays on the default language.

I have already tried in the documentation to find what about it, unfortunately in vain.

@bobdenotter
Copy link
Member

Dumb question: If you get a 404, it's (by definition) a page that doesn't exist. How would you determine what locale to use to show to the user?

In my opinion, the 404 page should have a message in the default locale, plus inlined in the same page, a short message in other supported locales.

@Blackswirllife
Copy link
Author

That's true, but that only applies to a static page in my opinion. We have wrapped the error page in the _master main and when the 404 is displayed, the language of the menu changes back to German, although the user has set the page to English.

When we put a link in to get back to the home page, this user comes back from English to the German home page, which affects the user friendliness a bit.

@Halopend
Copy link

Halopend commented Aug 31, 2022

So my trick for the 404 page has been to use notation like this

{{‘Whoops! This page does seem to exist’|trans}}

To allow the xlf translation engine to be used (basically, a more application/development focused translation engine built into symfony you can access either directly through a file or the symfony debugger).

Edit: I should add the documentation mentions using blocks but I could not get the content entry side of bolt to talk to the 404 (I’d get an error) but it was more so related to my master.twig having references to record which doesn’t apply to the 404 page).

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

No branches or pull requests

3 participants