Page MenuHomePhabricator

[Story] Determine list of available languages in a uniform way
Closed, ResolvedPublic

Description

The list of available languages (and their names), for use by MonolingualTextValue and friends, should combine three different sources:

  • MediaWiki core's Names.php
  • ULS' langdb.yaml (if available)
  • A config setting (plus system messages for the language names)

Related Objects

StatusSubtypeAssignedTask
ResolvedLydia_Pintscher
DeclinedNone
Resolved adrianheine
ResolvedSmalyshev
Resolved adrianheine
OpenNone
ResolvedAddshore
ResolvedTobi_WMDE_SW
Resolved adrianheine
Resolved adrianheine
ResolvedLydia_Pintscher
Resolved adrianheine
Resolved adrianheine
Declined adrianheine
Resolved adrianheine
Resolved adrianheine
OpenNone
ResolvedLucas_Werkmeister_WMDE
ResolvedAddshore

Event Timeline

daniel raised the priority of this task from to Medium.
daniel updated the task description. (Show Details)
daniel changed Security from none to None.

Note that there two use cases, which need different lists of languages:
one for languages that is supported for the UI (Names.php, pretty much),
and one for input (labels, description, monolingual text, etc).

Lydia_Pintscher raised the priority of this task from Medium to High.Dec 9 2014, 8:02 PM

Changing to high as it is blocking the migration of properties.

We need as starting list of language the languages defined by the ISO 639-3 norm. The best is to sort the list with the three-letter alphabetic codes and then to give the name of the languages in the language of the user. It is very difficult to choose the correct language when it is labelled in original alphabet like 中文(简体) or 中文(繁體).

adrianheine subscribed.

I rearranged the various tasks around this feature. This is now the tracking bug for a) supporting the same set of languages everywhere in the content and b) supporting languages on wikidata which are not yet present in any of the data sets we have access to.

thiemowmde renamed this task from Determine list of available languages in a uniform way to [Story] Determine list of available languages in a uniform way.Aug 24 2015, 9:22 AM
thiemowmde removed Wikidata-bugs as the assignee of this task.
thiemowmde edited projects, added ValueView; removed Tracking-Neverending.
thiemowmde removed a subscriber: Wikidata-bugs.

Theoretically, if I understand correctly, all valid ISO 639-3 codes could be used. This is the famous ~7000 number. Getting a list of valid codes shouldn't be hard.

If it doesn't scale, I'd support having an easy procedure for adding codes for needed languages. Adding a code to ULS's langdb is technically very easy.

Current work on language support is tracked in T124757 since I prioritized correct back-end behavior over consistency. This task will probably be picked up when I do T124758, but I might fix more serious bugs for terms language support first.

Addshore closed this task as Resolved.EditedSep 18 2018, 1:07 PM
Addshore claimed this task.
Addshore subscribed.

We kind of have this now:

	private function getMonolingualTextLanguages() {
		return $this->getWikibaseContentLanguages()->getContentLanguages( 'monolingualtext' );
	}

There is also an API for this.

For example, so I'll close this.

There is also an API for this.

Just checking, is that part of the external action API?