Property talk:P305

From Wikidata
Jump to navigation Jump to search

Documentation

IETF language tag
identifier for language or languoid per the Internet Engineering Task Force; can include a primary language subtag, subtags for script, region, variant, extension, or private-use. Format: 2 or 3 letters, followed by "-" if subtags present
Data typeExternal identifier
Template parameter|ietf= in w:fr:Template:Infobox Langue
Domainlanguoid (Q17376908), orthography (Q43091), keyboard layout (Q725744) or spurious language (Q5015649)
Allowed values([a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?(-[a-z0-9]{5,8})*(-u-sd-[a-z]{2}[a-z0-9]{1,3})?|i-[a-z]{3,8}|art-x-[a-z]{4,8})([a-z]{2,3}(-[a-zA-Z0-9]{1,8})*|i-[a-z]{3,8})|
ExampleBritish English (Q7979) → en-GB
Hungarian (Q9067) → hu
Arabic (101) (Q112882452) → ar-SA
Source When possible, data should only be stored as statements
See alsoISO 639-1 code (P218), ISO 639-2 code (P219), ISO 3166-1 alpha-2 code (P297), ISO 3166-2 code (P300), ISO 15924 alpha-4 code (P506)
Lists
Proposal discussionProposal discussion
Current uses
Total9,030
Main statement9,022>99.9% of uses
Qualifier7<0.1% of uses
Reference1<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Format “([a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?(-[a-z0-9]{5,8})*(-u-sd-[a-z]{2}[a-z0-9]{1,3})?|i-[a-z]{3,8}|art-x-[a-z]{4,8}): value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Flemish Sign Language (Q2107617), French Belgian Sign Language (Q3217332), Swiss-German Sign Language (Q35150), Nynorsk (Q25164), Bokmål (Q25167), Southern Min (Q36495), Min Chinese (Q56504), traditional German orthography (Q58483619), Oxford spelling (Q2273977), Saraiki (Q33902), Punjabi (Q58635), Shahmukhi (Q133800), Gurmukhi (Q689894), Saraiki Shahmukhi (Q113406611), Urdu orthography (Q112887037)
List of violations of this constraint: Database reports/Constraint violations/P305#Format, SPARQL
Single best value: this property generally contains a single value. If there are several, one would have preferred rank (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Llanito (Q79388), Shahmukhi (Q133800), Gurmukhi (Q689894), Punjabi (Q58635), Azerbaijani (Q9292), Saraiki (Q33902), Balochi (Q33049), Yem (Q36873), Ndonga (Q33900), Kwanyama (Q1405077), Ovambo (Q36489), Saraiki Shahmukhi (Q113406611), Urdu orthography (Q112887037)
List of violations of this constraint: Database reports/Constraint violations/P305#single best value, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Church Slavonic (Q33251), Old Church Slavonic (Q35499), Punjabi (Q58635), Ovambo (Q36489), Ndonga (Q33900), Kwanyama (Q1405077), Shahmukhi (Q133800), Urdu orthography (Q112887037)
List of violations of this constraint: Database reports/Constraint violations/P305#Unique value, SPARQL (every item), SPARQL (by value)
Conflicts with “instance of (P31): Wikimedia disambiguation page (Q4167410): this property must not be used with the listed properties and values. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P305#Conflicts with P31, search, SPARQL
Format “([a-z]{2,3}(-[a-zA-Z0-9]{1,8})*|i-[a-z]{3,8})|: value must be formatted using this pattern (PCRE syntax). (Help)
List of violations of this constraint: Database reports/Constraint violations/P305#Format, hourly updated report, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P305#Entity types
Scope is as main value (Q54828448), as qualifier (Q54828449): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P305#Scope, SPARQL
Wikipedia categories
categories combining article with other language external link (Q28373483) or article containing other language text (Q28368760) should also have P971 with a language-tag (Help)
Violations query: SELECT ?item ?lang { { ?item wdt:P971 wd:Q28373483 } UNION { ?item wdt:P971 wd:Q28368760 } FILTER NOT EXISTS { ?item wdt:P971 / wdt:P305 [] } OPTIONAL { ?item wdt:P971 ?lang . ?lang wdt:P31/wdt:P279* wd:Q17376908 } }
List of this constraint violations: Database reports/Complex constraint violations/P305#Wikipedia categories

constraint report relating to Wikimedia disambiguation page (Q4167410)[edit]

If instance of (P31) is a Wikimedia disambiguation page (Q4167410) the presence of IETF language tag (P305) is prohibited.

see: Wikimedia disambiguation page (Q4167410) with IETF language tag (P305) gangLeri לערי ריינהארט (talk) 15:11, 19 May 2014 (UTC)[reply]

should support other documents (e.g. HTTP/1.0 (Q31207264)[edit]

d1g (talk) 13:42, 30 June 2017 (UTC)[reply]

Regular expression[edit]

The regular expression for checking values of IETF language tag (P305) is currently a little too strict. For example, the IETF language tag for traditional German orthography (Q58483619) is 'de-1901', which is currently getting flagged as a constraint violation although the tag is correct. — Sascha (talk) 11:16, 8 February 2019 (UTC)[reply]

It's an exception (they don't create tags in that format any more) so I've added it as one. - Nikki (talk) 15:38, 18 April 2020 (UTC)[reply]