The searchWhere is a really useful function to search through your content easily.
However, just removing the case for search is not enought for all languages dealing with accent. I think the search search should also be accent insensitive.
Thanks for the idea. Unfortunately, there isn’t enough information in this post for it to be actionable. We need to see some code, with something like expectation vs reality.
Ok lets imagine a blog system with a search. The blog post have the following fields :
title
teaser
content
I created a blog post with the following title : “Mon actualité” and some lorem ipsum in content.
Here is the query when you fill something in the search input.
{% set records = posts.searchWhere(post('search'), ['title', 'content']).paginate(3) %}
If I search the word “Actualité”, it works cause it’s case insensitive
If I search the word “actualite”, it doesn’t work because of the “e” instead of “é”
In all search engine, accent is not considered when you search something because lot of people don’t type them. So, in the case above, when you search the word “actualite” the post with “actualité” in the title should be considered as a valid result.
The invert case is also true, if the post title have “actualite” and you search “actualité”, it should also be considered as a valid result.
depends on, what type of data you got in that posts… if it is instance of model, you can use anything related to that model, if it is collection, then probably you can filter data inside collection. when it is a query builder, you can use query builder methods to perform anything what you want. of course, it is not a good idea to assign any of these (only collection of results) to twig, but… u know…
Don’t you think that rainlab.translate would be the perfect plugin to host a method that would facilitate query on words with accent ?
Don’t think that the core multisite feature would be the right place cause you can have multisite websites that does not deal with different languages, but the rainlab.translate seems to be the perfect place.