Help:Default values for labels and aliases/zh

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Help:Default values for labels and aliases and the translation is 10% complete.

Items can (now) be given default values for labels and aliases, such as names and other proper nouns unlikely to differ between languages. Default values simplify working on items that have identical values for labels and aliases in a plurality of languages. You can still set different values for individual languages. These default values can be accessed via API using the language code mul ("multiple languages").

它如何运作?

Mockup of the default values feature

* Add a default value for a label and/or alias. * Wikidata uses these default values for labels or aliases where no other value is given (see screenshot). * Where applicable: Add a statement to indicate the native language of the label, e.g., name in native language (P1559) or native label (P1705).

何时应使用标签和别名的默认值?

There are types of Items where you should apply default values:

Names * People, e.g. Douglas Adams (Q42). Use the name in native language and native script as the default value. Please remember to add a name in native language (P1559) statement. * Given names and family names, e.g. Conti (Q21448867). * Astronomical objects, e.g. SDSS J151017.36+160605.3 (Q74758893). * Taxa, e.g. Neotrogla curvata (Q39898268).

Titles * Scientific articles and version, edition or translation, e.g. Wikidata: A Free Collaborative Knowledgebase (Q18507561). Use the title in the language of the document as the default value. Don't forget to add a language of work or name (P407) statement.

Symbols and characters * Unicode characters, e.g. U+2663 (Q87526860). * Element symbols, e.g. C (alias).

Codes * Country codes, e.g. CH (alias).

Wikimedia pages * Disambiguation pages, e.g. C (Q28006).

常见问题

===Do I need to repeat aliases in my language?=== No. The purpose of aliases is only to find entities in searches. All languages are used when searching, so generally aliases need not be repeated. Instead, add aliases that are valid across many languages to the 'default values' section.

为什么这很重要?

More and more we see redundant labels, aliases, and descriptions being added to Wikidata entities. These are hard to maintain, and all superfluous data brings our already overburdened infrastructure closer to its limits (see Wikidata Query Service). Default values improve the situation for labels and aliases; a different solution is in the works for descriptions (viz. T303677).

===When will this be rolled out?=== It is available in a limited release mode now. The full rollout will follow in Q3 2024.

===Where can I report problems?=== Please report problems on the talk page of this page.

How can I add a default value to an item?

Add {{#babel:mul-1}} to your user page, below your native language and above your secondary languages. This allows you to add default values using Wikidata's web interface. The order of mul babel tag relative to other language is important: If mul is not the first language immediately after your native language, Wikidata will pick label in your secondary language as a fallback if label in native language is not available, rather than using mul label as the fallback of the label in native language.

Alternatively, default values can be added using QuickStatements with the commands

  • Itemnumber|Lmul|"default label value" for Labels, and
  • Itemnumber|Amul|"default alias value" for Aliases.

How to show the default label in Wikidata Query Service (WDQS)?

If your SPARQL query uses the wikibase label service, change SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } into SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }.

If your SPARQL query uses the rdfs:label predicate, you can use the following code:

OPTIONAL { ?item rdfs:label ?labelEN. FILTER ( lang(?labelEN) = 'en' ) }
OPTIONAL { ?item rdfs:label ?labelMUL. FILTER ( lang(?labelMUL) = 'mul' ) }
BIND(COALESCE(?labelEN, ?labelMUL) AS ?itemLabel).