Page MenuHomePhabricator

Use the Language selector to switch language of translatable pages
Open, In Progress, MediumPublic8 Estimated Story Points

Description

Translatable pages allow contents such as project documentaiton on Mediawiki.org to be multilingual. Currently a flat list with all languages in which the content is available is listed above the page contents. As the content is translated into more languages, this makes it hard for users to find the content in their language (they have to scan a long list or rely on the browser search), clutters the page, and pushes the content down.

This ticket proposes to use the Language selector from ULS to make language selection consistent with the way languages are selected on other projects like Wikipedia.

Multilingual page on MediawikiWikipedia page connected to other language versions
www.mediawiki.org_wiki_Download(Wiki Tablet).png (768×1 px, 245 KB)
en.wikipedia.org_wiki_Wikipedia_Database_download(Wiki Tablet).png (768×1 px, 288 KB)

Design details

  • The current list of languages will no longer be shown directly on the page.
  • An access point will be provided as a button at the far end of the page title area (like in Wikipedia).
  • The language selector will list the languages in which the contents are available.
  • The languages in the list will have the indicators of translation completion (blue dots) in the space reserved for indicators (placed before the name and used on Wikipedia for "Featured article" indicators and similar). (T352425)
  • The "add languages" option (T323694) may need adjustments. If there is only one action available, it may be displayed directly.
  • We need to explore how to communicate the current selected language (especially when it is different from the current UI language) at the page and/or selector level. Note how multilingual pages currently have the currently selected language in bold.

This ticket is focused on cases where the page is available in several languages. A separate ticket (T353235) will cover other cases where the page has not been made multilingual, it has not been translated to other languages yet or has changes in the source contents pending to be marked for translation.

Event Timeline

Nikerabbit set the point value for this task to 8.Jan 16 2024, 9:03 AM

Language selector for translatable pages is enabled on translatewiki.net and can be seen in action on https://translatewiki.net/wiki/Project:About

Either of the below configuration for PageTranslationLanguageList enables this functionality:

// Display languages as interlanguage links and also in tag if it is present on the page.
$wgPageTranslationLanguageList = 'sidebar-always';
// Display languages as interlanguage links only and ignore the tag even if present on the page.
$wgPageTranslationLanguageList = 'sidebar-only';

There are two things missing in the current implementation that are mentioned in the design details:

  • The "add languages" option (T323694) may need adjustments. If there is only one action available, it may be displayed directly. - Where should this redirect? To Special:Translate? If so with which language selected as the target language?
  • We need to explore how to communicate the current selected language (especially when it is different from the current UI language) at the page and/or selector level. Note how multilingual pages currently have the currently selected language in bold.

@Pginer-WMF, About this point:

We need to explore how to communicate the current selected language (especially when it is different from the current UI language) at the page and/or selector level. Note how multilingual pages currently have the currently selected language in bold.

Do you think this is a blocker for this task? We've had the language selector enabled on translatewiki.net for a while, and there hasn't been a request to have this feature.

@Pginer-WMF, About this point:

We need to explore how to communicate the current selected language (especially when it is different from the current UI language) at the page and/or selector level. Note how multilingual pages currently have the currently selected language in bold.

Do you think this is a blocker for this task? We've had the language selector enabled on translatewiki.net for a while, and there hasn't been a request to have this feature.

I don't see it as a blocker. I was mainly highlighting an existing cue that would be lost. Users can always look for the language they want, even if it is the current one. That case is not the most efficient, and we may want to observe if it is an actual problem in practice and consider future polishing if needed.

abi_ changed the task status from Open to In Progress.Aug 12 2024, 5:36 AM

The readers need a way to understand whether they are going to a different website, where there is a different content on the same topic, or staying on the same website and open the same content that was translated.

This requires an additional notice somewhere, I suppose.

The readers need a way to understand whether they are going to a different website, where there is a different content on the same topic, or staying on the same website and open the same content that was translated.

This requires an additional notice somewhere, I suppose.

Thanks! That's a good point.

We started consultation with the community and there is some feedback that we need to review:

  1. https://translatewiki.net/wiki/Support#Using_the_Language_selector_to_switch_language_of_translatable_pages
  2. https://meta.wikimedia.org/wiki/Meta_talk:Babylon#Using_the_Language_selector_to_switch_language_of_translatable_pages

@abi_ Hello, as mediawiki.org is also one of the wikis that heavily uses the Translate extension, maybe start a consultation on their Village Pump? Thanks.

@abi_ Hello, as mediawiki.org is also one of the wikis that heavily uses the Translate extension, maybe start a consultation on their Village Pump? Thanks.

Done: https://www.mediawiki.org/wiki/Topic:Yc6jym3fnoioygqb.

Thanks!

I had to hide these links for my account several years ago because of how distracting the content was (to me). Good to see this is being moved to a better place.

abi_ removed abi_ as the assignee of this task.Nov 11 2024, 7:21 AM

Currently not working on this. Removing myself from the assignee.