Multilanguage Issues and Oddities

I decided to have a play with the multilanguage settings in my personal xwiki, and I’ve noticed a few things that seem a little odd.

First, the setup: I’ve enabled multilanguage support, and then added Chinese Traditional, Chinese Simplified and French languages.
Screenshot 2022-05-04 at 15.14

Next, I’ve created a page under the sandbox for my multilingual test in English and saved it (ignore the typo)
Screenshot 2022-05-04 at 15.18
The first oddity is that there is no “translate” button when I edit the page. Only when I enable the page information, and the page information panel, do I find places where I can click on a different language. Also, my web browser default langauge is set to zh-CN.

When I go back to edit the page, there is still no translate button available inside the editor, either with the inplace editor, or the WYSIWYG editor.

Not only is there no translation button available, but there is no translation link for Chinese Simplified or Chinese Traditional. Only when I go back and select “Chinese” in the Language settings, do I now get a link for “Chinese” translations in the Page Information tab and Page Information panel. (in the examples above, the Chinese link shows because I had already taken this step). So I can use Chinese, but not Chinese Traditional and Chinese Simplified.

However, the xwiki documentation clearly shows a “translation” button inside the editor: [Internationalization (XWiki.org)].

I can make the translation button appear, but only if I add ?language=fr or ?language=zh-cn to the url of the english page and then the translate (into that language) button appears.

This is not particularly user friendly, or clear.

Perhaps a better user interface suggestion would be to have a Translate menu appear (or language?) where you could select the langauge you want to edit. So in my example, if I edit the English language page, the Translate/Language menu would list the other languages supported by the wiki, which in this case would be Chinese/French/German. Otherwise, I have to enable the information tab at the bottom of the page to switch between page versions.

Yes, I understand that xwiki will query the browsers “accepted langauges” and offer the correct translation if it is present, but that’s a hassle to change if I want to view a different langauge. It would be a good to have an easier way to switch language.

The user setting, Global, Language setting won’t work very well as it only lists the currently provided translations for that particular page.


Next is searching - when I enter the wiki via English, and I search for a French key word/phrase, the French pages are not turned up by default in the search results:
Screenshot 2022-05-04 at 16.01

Instead, I have to go to the search page and explicitly select the “French” language option:
before
Screenshot 2022-05-04 at 16.03
after
Screenshot 2022-05-04 at 16.04

Is there any way to change the search results to default to returning results from all languages?

Another problem:

After enabling multilanguage and adding a few translations, I find that I cannot find search results from the Chinese pages. It works for French, German but not Chinese.

French:
Screenshot 2022-05-04 at 16.20
German (weird, notice the ui langage changed):
Screenshot 2022-05-04 at 16.21
but not Chinese (the search string is present as an string inside a single English page, so that is an expected find)
Screenshot 2022-05-04 at 16.24

The following page should have been returned as a result, but did not.
Screenshot 2022-05-04 at 16.26

So it appears that my index is not indexing non English characters correctly?

The encoding appears to be set correctly (Global Administration, Other, Admin Tools, XWiki Configuration Check)
Screenshot 2022-05-04 at 16.29

/bump/

tldr; two outstanding questions

1/ is there a way to modify the search so that by default it searches across all language pages, rather than having to take the extra step of selecting the languages from the search page?

2/ Does anyone have any idea why I cannot search the Chinese language pages in my wiki?

Hi, it’s probably related to [XWIKI-18418] Traditional Chinese content is not supported by the Solr search - XWiki.org JIRA

HAhaaha… yeah, that would explain it. Also, I suspect it affects simplified Chinese as well.

Thanks.

[edit] yes, I read the jira - All Chinese is affected.

This sounds like a new bug to me, AFAIR the translate button should appear if your browser language setting matches a supported language in the wiki and the page doesn’t exist in that language. Is that correct @mflorea ?

Looks related to [XWIKI-13966] Confusion between several options in language selection for a wiki - XWiki.org JIRA to me

Related to [XWIKI-17063] Multilanguages selection menu is inconsistent - XWiki.org JIRA also

Thanks for investigating those, we clearly have lots of bugs opened related to multilanguage features: sadly it’s rarely a priority in our roadmaps to keep working in this area.

1 Like