getgrav / grav-plugin-error

Grav Errors Plugin
https://getgrav.org
MIT License
4 stars 29 forks source link

Added multi-language information and German translation #7

Closed janklostermann closed 6 years ago

flaviocopes commented 8 years ago

@rhukster what do you think, is this a viable way to add a translation? Having separate pages for separate languages?

Or maybe it's better to have

process:
  twig: true

in the error.md page frontmatter, and add {{ "PLUGIN_ERROR.ERROR_MESSAGE"|t}} in the page body.

For the title however it's the theme job to translate it, e.g. Antimatter has {{ header.title|e('html') }}, should change to {{ header.title|e('html')|t }}

rhukster commented 8 years ago

I think single page with twig-based translations is best.

flaviocopes commented 8 years ago

Half-implemented this in https://github.com/getgrav/grav-plugin-error/commit/2e7c157f19161aecbc5f6919a99daf8a44116cbc. The page title cannot be translated with a single page, not consistently across themes, as they do not usually translate the title. Might need to have multiple pages just for the title?

rbukovansky commented 7 years ago

The header/page title issue should be resolved by #26 now...

rhukster commented 6 years ago

Sorry this was done already