Recently Browsing 0 members
- No registered users viewing this page.
how would I do a multi-language website search with just a selector?
I have many multi-lang fields and I want to do a search through all of them at once and through all of their language values.
Is there a "selector way" of doing this? Maybe something like `title|title:de|title:it`? It seems I have seen this somewhere a long time ago but can't find in any documentation or forum search...
Or the only way of doing it is by running separate searches for each language with output formatting off and then consolidating it all in one single results array?
Because I still want to give users a result, even if it is in another language than current $user. Visitors mostly will be searching for specific terms that are very similar in all languages, but might be not used in one language version of a single page, for example. Or the user might not have switched language tohis prefered and did the search first, etc.. (many use cases in my situation)
$pages->find('title~='.$q) - maybe different operator is needed? /en/search/?q=visit = 1 results /it/search/?q=visit = 0 results Thanks for any advice!
One of my customers needs to have his site translated by a publisher. He asks me if it is possible to create a role that could only edit the German version of the pages, without permission on the English version.
I haven't found any permission related to this need, but maybe it's possible from a hook?
Thank you for your help
By Crowdland Technology
I'm having some issues with Greek as default language, because the page name is not created automatically when enter the title of a new page.
Any chance to add support for it?
I found this char mapping that might help on line 188
[EDIT]: A solution
This was easier than we thought, we managed to find a solution by looking at how the sanitizer of page names works.
This is how the URL looks with this solution:
For ProcessWire 3+ (what we tested) find Modules > Core > InputfieldPageName and under the “Character Replacements” Field you can add the mapping you would like.
The replacement is not in the Core yet, so adding it for reference. The mapping is adjusted and simplified, and it follows the official Transliteration found here: https://en.wikipedia.org/wiki/Romanization_of_Greek
Cheers to @PWaddict for also supplying an unofficial mapping and pointing us to the right direction
@ryan It would be great if this would be added to the Core sometime in the future and we can assist with further official mappings that are not present in this simplified version.
Elissavet from CrowdLand
Sorry for the convoluted title. I have a problem with Process modules that define a custom page using the page key through getModuleInfo (as demonstrated in this excellent tutorial by @bernhard). Those pages are created automatically when the module is installed. The problem is that the title of the page only gets set in the current language. That's not a problem if the current language (language of the superuser who is installing the module) is the default language; if it isn't, the Process page is missing a title in the default language. This has the very awkward effect that a user using the backend in the default language (or any other language) will see an empty entry in the setup menu:
This screenshot comes from my Cache Control module which includes a Process page. Now I realize the description sounds obscure, but for us it's a common setup: We a multiple bilingual sites where the default language is German and the second language is English. While the clients use the CMS in German, as a developer I prefer the English interface, so whenever I install a Process module I get this problem.
As a module author, is there a way to handle this situation? I guess it would be possible to use post-installation hooks or create the pages manually, but I very much prefer the declarative approach. The page title is already translatable (through the __ function), but of course at the time of installation there is no translation, and as far as I'm aware it's not possible to ship translations with a module so they are used automatically. Could this situation be handled better in the core? I would prefer if the module installation process would always set the title of the Process page in the default language, instead of the language of the current user.
By Noel Boss
Hi everyone 🙌
Is there a way to order the language tabs in the backend? Currently, they seem to be ordered based on the created date (or id?) …
( time passes … ⏰ 🚶♂️)
Just answered my own question. One can reorder the languages in the page tree under admin » languages or directly in the DB » pages » template_id=54 » sord field.
Anyone knows if there are side effects when moving the default language from sort 0 to somewhere higher?