grav-plugin-simplesearch
grav-plugin-simplesearch copied to clipboard
Translate page title in search results
As far as I can see the page title comes from "pages/simplesearch.md". Have I overlooked something or does that mean the page title is not able to be multilanguage?
Currently this is somewhat hardcoded. I need to think of a good way to allow multi language pages.
Really I need to add support for a custom Grav page of your choosing that you use to setup translated titles and such.
Thank you for your answer. Multilingual date formats should be considered too.
simplesearch is actually pointing to simplesearch.md
file in simplesearch.php
.
It could point to simplesearch.current_system_set_languages.md
, that would be it.
Hi guys! Perhaps a solution for the title of the results page to be translated. Simply by replacing the title tag of the base.html.twig page of your theme:
<title>{% if header.title %}{{ header.title|e('html') }} - {% endif %}{{ site.title|e('html') }}</title>
by
<title>{% if search_results %}{{"PLUGIN_SIMPLESEARCH.SEARCH_RESULTS"|t('html')}}{% else %}{{ header.title|e('html') }}{% endif %} - {{ site.title|e('html') }}</title>
What's the status?