Page MenuHomePhabricator

Support language fallbacks in wbformatvalue
Closed, ResolvedPublic


Currently, only one language can be passed via lang option. The API should either use the fallback chain also used for generating static html, or support getting a language fallback chain passed in.

Event Timeline

adrianheine raised the priority of this task from to High.
adrianheine updated the task description. (Show Details)
adrianheine added a subscriber: daniel.

Change 203189 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Fix language fallback in value formatters

The patch above enabled language fallback without any extra options being present. Fallback is always applied based on the target language, in the same way it is applied when generating HTML. This was already the case for ValueFormatters used via SnakFormatters; the above patch enables the same default behavior for stand-alone ValueFormatters, as used by the wbformatvalue API module.

Specifying a fallback chain explicitly via the options parameter of the API module would be nice to have, but isn't needed right now. The UI doesn't even have sufficient information to build such a fallback chain, I think.

Change 203189 merged by jenkins-bot:
Fix language fallback in value formatters

daniel moved this task from Review to Done on the Wikidata-Sprint-2015-04-07 board.