grav-plugin-simplesearch icon indicating copy to clipboard operation
grav-plugin-simplesearch copied to clipboard

Translate page title in search results

Open ikabod opened this issue 8 years ago • 6 comments

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?

ikabod avatar May 02 '16 09:05 ikabod

Currently this is somewhat hardcoded. I need to think of a good way to allow multi language pages.

rhukster avatar May 03 '16 21:05 rhukster

Really I need to add support for a custom Grav page of your choosing that you use to setup translated titles and such.

rhukster avatar May 03 '16 21:05 rhukster

Thank you for your answer. Multilingual date formats should be considered too.

ikabod avatar May 04 '16 11:05 ikabod

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.

tidiview avatar Dec 10 '16 13:12 tidiview

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>

Tepeek avatar Apr 19 '17 14:04 Tepeek

What's the status?

avxkim avatar Apr 06 '18 13:04 avxkim