Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate page title in search results #43

Open
ikabod opened this issue May 2, 2016 · 6 comments
Open

Translate page title in search results #43

ikabod opened this issue May 2, 2016 · 6 comments

Comments

@ikabod
Copy link

ikabod commented May 2, 2016

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?

@rhukster
Copy link
Member

rhukster commented May 3, 2016

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

@rhukster
Copy link
Member

rhukster commented May 3, 2016

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

@ikabod
Copy link
Author

ikabod commented May 4, 2016

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

@tidiview
Copy link
Contributor

tidiview commented Dec 10, 2016

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.

@Tepeek
Copy link

Tepeek commented Apr 19, 2017

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>

@avxkim
Copy link
Contributor

avxkim commented Apr 6, 2018

What's the status?

rhukster pushed a commit that referenced this issue May 13, 2020
Made code modifications to create a custom page without having to include a simplesearch section in the header. If the custom page contains a template variable in the header, it takes precedence over the setting in the config file. When using the default page, the opposite behavior occurs, where the settings in the config file are preferred, which overrides the settings in the page header, assuming that the default page now contains the template variable directly from the plugin authors.

This fixes some of the issues described in #173 and #43 (maybe others too).

I will send other separate improvements in the next Pull request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants