Giter Site home page Giter Site logo

Comments (3)

bobdenotter avatar bobdenotter commented on June 3, 2024

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.

from bolt.

Blackswirllife avatar Blackswirllife commented on June 3, 2024

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.

from bolt.

Halopend avatar Halopend commented on June 3, 2024

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).

from bolt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.