Skip to content

[4.x] Multilingual support for error renderers #2731

Description

@adriansuter

Of course, Slim should stay slim - but I was wondering if it would make sense to add some sort of multilingual support for the following error renderers?

  • \Slim\Error\Renderers\HtmlErrorRenderer
  • \Slim\Error\Renderers\PlainTextErrorRenderer

They define some texts (hard-coded in the source code) like the title Slim Application Error or The application could not run because of the following error or A website error has occurred. Sorry for the temporary inconvenience and so on.

Or should that be left to the user? So he/she has to write a custom error handler. I mean, the user might even decide to use Twig or any other templating engine to do the rendering.

Notice 1:
The XML and JSON error renderers do not contain texts that should be translatable.

Notice 2:
The error messages itselves (at least the php error messages) would still be in english, of course. But in production, these error messages should not be shown ($displayErrorDetails = false) anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions