When starting to use our Wiki, I still had default language settings configured, which meant that the Wiki defaulted to English.
Meanwhile I switched the language to German. It’s no multilingual Wiki, only German content.
Now I just noticed that Search is basically “not working” for all pages created until I switched the language, as those older pages are (wrongly) marked as “English language” and the Search by default only includes German language pages…
If I manually include English language pages in the search, the wrongly-tagged pages are found as desired.
Is there any way to fix the language meta data of that older pages (after finding How do I change or set a language on a page? I fear there isn’t yet :-/ ) or to configure the Search to include all languages by default?
I just noticed the language selector in CKEditor - could it help? Currently however, it only offers
Arabic
French
Spanish
None of these languages is configured in Xwiki administration page however (the default was English and I just added German and made it default). Where does this language list come from, and how can I change it to include German and English?
Otherwise you need a script. I don’t know is there is such a script. One place to look for is https://snippets.xwiki.org .
Edit Main.SolrSearchConfig, look for facetQuery and remove the line that sets the locale filter.
That is used to mark a paragraph from your page as being written in a different language than the page itself (your page is in German and you insert a quote that is in French). The list of languages that appear on this drop down can be configured from the WYSIWYG editor administration section.
Thanks a lot. The Wiki still has sufficiently few pages so manually updating the default language it was feasible and the simplest solution.
After redindexing, the search works much better now, so I do not need to adjust the Solr query.
Concerning the language drop down in CKEditor, I was not able to successfully locate the config option:
Or do I have to configure it using the “Advanced Configuration” text field? I searched the CKEditor extension page and Xwiki Internationalisation pages for hint, but without success. Where does the default list of “Arabic, French, Spanish” come from? Is it just CKEditor’s default - but as a default that’s an somewhat uncommon language selection.
Yes, you need to use the “Advanced Configuration” text area. CKEditor and its plugins have a huge number of configuration options so we can’t expose all of them in the administration section. See Class Config (CKEDITOR.config) | CKEditor 4 API docs
Defaults to [ 'ar:Arabic:rtl', 'fr:French', 'es:Spanish' ]
That is just the default from CKEditor. We didn’t overwrite it.