Difference between revisions of "Translations"

From Wikidocumentaries
Jump to navigation Jump to search
(User Interface language)
(Fallback chain guideline)
Line 39: Line 39:
===Fallback chain guideline===
===Fallback chain guideline===
The display language is based on the following fallback chain.
The desired display language is based on the following fallback chain.
# UI language (English default, user-defined.)
# UI language (English default, user-defined.)
# Topic's original language (how?)
# Topic's original language (how?)

Revision as of 03:52, 15 August 2019

Wikidocumentaries is multilingual. The user interface language can be changed to any available language. The UI languages are translated in TranslateWiki.net.

It is also possible to view only the article in another language. The article language menu will display the user's available languages and a link to all available languages. See Article.

  • If the topic exists in Wikidata, the articles generally exist in different language Wikipedias.
  • If the topic exists in Wikidocumentaries, the articles generally exist in Wikidocumentaries.

dispo displays Wikipedia articles Interface and content language can be changed in the main menu.

Wikipedia Other languages.png


  • Translations are managed in TranslateWiki. It produces json-files in all included languages
  • The json files are put together in wikidocumentaries-ui/src/store/messages.js.

Languages used

User Interface language

  • The UI language must have at least 25% translated messages to be imported to the project.
  • It is still possible to navigate using further language codes in the site URL.
  • The default language is the browser language currently English.
  • The user may change the interface language of the site to a supported interface language.
  • The language menu displays the available languages in the order of the user's language fallback chain. An extra option links to adding a missing translation to the user's language. The list could be made more compact by creating one option for the remaining languages.
  • The menu is created in UILanguageMenu.vue.
  • English is used as the ultimate fallback option.

Language fallback

Wikidata language fallback is described here.

Language fallback mechanisms

Language fallback is handled differently in different cases. The MediaWiki API uses one mechanism and the SPARQL queries use another. Different components are based on different queries.

MediWiki API

  • Topic title and description
  • Map labels
  • Wikidata component values

SPARQL query

These use SPARQL, and the fallback chain is declared in each query.

  • The works, locations, related people and depicted in.

Fallback chain guideline

The desired display language is based on the following fallback chain.

  1. UI language (English default, user-defined.)
  2. Topic's original language (how?)
  3. Best option in the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
  4. English
  5. Any language ordered by...


  • The article is primarily displayed in the UI language
  • If the article does not exist in the UI language
    1. a message to select another language is displayed.
    2. Alternatively, the article can be displayed in the best available language option of the language fallback chain.
    3. It is possible to create article generators that create stub articles from recorded facts.
  • The article language menu displays a list of available article languages. The list is scrollable and displays all available languages in the following order.
    1. Available languages in the order of the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
    2. English
    3. Any language ordered by...
  • The menu is created in ArticleLanguageMenu.vue.

Search conditions

See also other search conditions in the Images page.

  • The topic title is used to search for images
  • Additional labels in different languages, properties and aliases may be used also
    • Labels and aliases in primary languages
    • Also use values of name properties if available.
  • The primary language for the search term is chosen based on
    • API service's preferred language(s)
    • Topic's original language (how is this reasoned?)
    • English


About Technology Design Content modules Tool pages Projects

Wikidocumentaries blog

Wikidocumentaries demo

Phabricator project

Facebook group

GitHub repository

Translation in TranslateWiki

Wikidocumentaries Slack

Setting up dev environment




Using Wikibase

Federation with Wikidata



Media metadata

Properties to content

User registration


Page types

Landing page

Search page

Topic page

User page

Organisation page

Project page

Tool page



Main toolbar and footer


Topic page header

Content module




Active modules


Family tree


Historical map


Image viewer



Module ideas







Newspaper articles






Visual editor

Query tool


Open Refine

Creating topics

Uploading images

Geolocating tool

Metadata editor

Rectifying maps


Annotation tool

Central Park Archives

Convent Quarter