Page MenuHomePhabricator

Wish: Allow displaying language names in interface language, for dictionary-like usage
Closed, DuplicatePublic

Description

By default the languages a page is translated to are always displayed as autonyms. In my situation I needed them to be shown in the user interface language. I accomplished that with the following one-line hack in PageTranslationHook:languages():

...
foreach ( $status as $code => $percent ) {
                        // Get autonyms (null)
                        $name = TranslateUtils::getLanguageName( $code, $userLangCode ); // #custom: Display language names in selected language
                        $name = htmlspecialchars( $name ); // Unlikely, but better safe
...

As I'm probably not the only one who would need that behaviour it would be nice to have this configurable.

Event Timeline

I needed them to be shown in the user interface language

Hi, could you explain which underlying problem this solved? Thanks :)

This is for scenarios where the main user group are people who don't even speak the translated languages, but need to use the translations.
Typical example: A voluntary refugee organisation wants to translate some relevant messages (e.g. where to find a doctor, how to separate the waste etc.) into the languages of the people coming using the Translate extension. The translators are refugees, but the main users of that wiki are the volunteers not speaking these languages at all, but showing these translated messages to the people they're working with. Most of the volunteers are not able to read and distinguish the autonyms of e.g. Urdu, Arabic and Persian - for them it's much easier if the language names are displayed in their language.

This is for scenarios where the main user group are people who don't even speak the translated languages, but need to use the translations.

The current assumption is that to really "use" a translation you need to know at least some basics of the language.

Also, we prefer to give priority to the translators' needs: are you really comfortable with making the wiki less easy to use for the translators/refugees, just to make it potentially easier for the volunteers you mention?

volunteers not speaking these languages at all, but showing these translated messages to the people they're working with

Ok. Can you clarify how these users usually access the pages/translated content?

Nemo_bis renamed this task from Wish: Make display of language names configurable to Wish: Allow displaying language names in interface language, for dictionary-like usage.Feb 20 2017, 10:47 AM
Nemo_bis triaged this task as Low priority.

Also, we prefer to give priority to the translators' needs: are you really comfortable with making the wiki less easy to use for the translators/refugees, just to make it potentially easier for the volunteers you mention?

For the translators there is no big change: When you go to "translate this page", you still see the selection of available languages as autonyms. This change only affects the display of languages in the "other languages" box, not for other language selections.

Ok. Can you clarify how these users usually access the pages/translated content?

Suggest you have the refugee's volunteer wiki which lists on the front page the 10 different small texts they frequently need to show to the refugees. These have been translated into a number of relevant languages.
Now as a volunteer you have a person in front of you. He shows you his name card and you have paper lists of all people you serve where you look him up and see what language he speaks (this organization is organized.)
So in the wiki you select the text you need to show to that person in front of you, go to the "other languages" box and select e.g. Tigrinya and show it to that person.

I hope that makes sense?

Nikerabbit subscribed.

The plan is to migrate page translation language selector to the new language selector. We can't do this in Translate itself due to performance reasons. I have marked this as duplicate of the feature request in ULS.