Comments (3)
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.
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.
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)
- exposing an endpoint in socket mode HOT 1
- error when accessing boltcms url HOT 8
- Export 0000-00-00 00:00:00 dates as Unix time
- SetContent is not case-insensitive in all databases
- template field lists underscore files in subfolders HOT 2
- Bolt CMS 3.7.4 incompatibility with PHP 7.4 - Trying to access array offset on value of type bool
- Trying to get in touch regarding a security issue
- BOLT is crashing when optimizing python HOT 2
- Uploaded PDF Files not opening in browser HOT 1
- Database export Nut command does not export relations between records HOT 1
- Keep the current locale visible in backend viewport at all times HOT 1
- Problems Run bolt.so on M1 Mac HOT 1
- Cannot Install Bolot 5 HOT 1
- Old AVX test fails due to GPF/sigsegv HOT 1
- Plans for Bolt 6 / Symfony 6 / Stimulus / API Platform 3 HOT 3
- DELETE method not working for Contents API
- app/nut database:export outputs unexpected results for multi-contenttype select fields HOT 1
- Dependency Resolution Performs Extremely Slowly HOT 1
- bolt fails to deploy on hosts with debian bookworm HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolt.