Hi. I’m new to Kirby and I’m just trying to figure some things out.
First, congrats! I had a multi-language test site up and running like a charm in under 5 minutes… Then I added a search function, which also works, but only for the English site (English is set as standard language).
i.e. When I have one page open in another language and start a search, it throws back a “no results for …”.
Is there a way that Kirby (1) loops through all languages and shows the results, or (2) only returns results of the currently active language?
(By the way… Does this affect also tag functionality for a blog in multiple languages? I haven’t tried it yet…)
Where do I find out what can be filtered by filterBy function? The example above is not mentioned in the docs.
Is this a working example? Sadly, it does not work for me when applying the filterBy function to foreach function.
EDIT: I now understand that this example of FabianSerrle only works when adding custom fields to the text files.
Is there any other way to filter by language? This should be a basic function of a CMS, I guess.
Is language() returning a native attribute of the child page or just the function to retrieve the custom language field I have to use in my text file?
The filter method you mentioned only works when explicitly adding a custom field named “language” to the text file.
Isn’t there a way to easily filter by file name ending? (like *.en.txt or *.de.txt). I would expect this kind of filter to be included as it already has to be used by the core itself!?