Property talk:P424
Documentation
identifier for a language or variant as used by Wikimedia projects
List of violations of this constraint: Database reports/Constraint violations/P424#Single value, SPARQL
(|[a-z]{2,3}(-[a-z] ){0,2}|simple)
”: value must be formatted using this pattern (PCRE syntax). (Help)List of violations of this constraint: Database reports/Constraint violations/P424#Format, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P424#Type Q17376908, Q14827288, Q21450877, Q21469493, Q43091, Q2092812, Q8192, Q20829075, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P424#Entity types
List of violations of this constraint: Database reports/Constraint violations/P424#Scope, SPARQL
This property is being used by:
Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
|
Should this link somewhere ?
[edit]With MediaWiki:Gadget-AuthorityControl.js, it's possible to have the string link somewhere.
Shall we use this to link to Wikipedia? Sample: on Japanese "ja" would link as ja. -- Docu at 15:49, 14 April 2013 (UTC)
format pattern
[edit]i changed the pattern from ([a-z-][a-z][a-z]?(-x)?(-[a-z][a-z] )?|simple) to ([a-z-][a-z][a-z]?(-x|-min)?(-[a-z][a-z] )?|simple) for zh-min-nan --Akkakk 00:28, 4 June 2013 (UTC)
- I generalized it, from:
([a-z-][a-z][a-z]?(-x|-min)?(-[a-z][a-z] )?|simple)
- to:
([a-z]{2,3}(-[a-z][a-z-]*)?|simple)
- to:
- LaddΩ chat ;) 13:04, 4 March 2014 (UTC)
Qualifier for definition
[edit]Currently this property has two functions:
- 1. link to the item that describes what language, languoid, writing system, etc. a specific code refers to. Sample: Q2087886
- 2. determine the WMF language code of an item. Sample: Q8937989
As there is no easy way to select (1.), I'd add a qualifier to these statements, e.g. P794 (P794): definition (Q101072).
--- Jura 05:43, 21 January 2016 (UTC)
Use of "ru" on Old East Slavic (Q35228) and "fr" Middle French (Q1473289)
[edit]Russian (Q7737) seems to describe more closely "ru" and French (Q150) "fr", so I removed it from the above.
--- Jura 06:03, 21 January 2016 (UTC)
Use of "el" for Medieval Greek (Q36387) and Greek (Q9129)
[edit]"el" seems to be just for Modern Greek (Q36510). Is this correct? I replaced the others with "mis".
--- Jura 17:55, 28 January 2016 (UTC)
New WMF language codes available: "und", "mis", "zxx", "mul"
[edit]See Property_talk:P1684#New WMF language codes available: "und", "mis", "zxx", "mul".
--- Jura 17:55, 28 January 2016 (UTC)
Inclusion in new language/projects template of Language committee at Meta
[edit]At meta:Template talk:New wiki request, I suggest to include the item of the language into the template used there. It would display information about the language (and the WMF code) when new projects or languages are discussed.
--- Jura 11:31, 31 January 2016 (UTC)
English description
[edit]@Jura1: In the description of how to use this, you added two things:
"The single item that describes the language best should use it with the qualifier P794 ("as") with value Q22283033 ("primary definition").". Why? We have the preferred rank for marking the preferred value, we shouldn't be using qualifiers to emulate that feature.
"Languages without a code can use "mis".". Why? We have the special value "no value" to say that there is no code for it, we shouldn't be using an actual string to emulate that feature either.
- Nikki (talk) 18:48, 15 February 2016 (UTC)
- Did you have a look at the two previous threads about these? To help us stay focused, it might be better to comment there.
--- Jura 06:45, 16 February 2016 (UTC)
Clarifying the scope of this property
[edit]First: the description says "Wikimedia language code", but formatter URL (P1630) "https://$1.wikipedia.org" seems to indicate it's limited to Wikipedias. Is this right? Next, for sites like Norwegian Wikipedias (Q191769), where the content language code ("nb") differs from the site prefix ("no.wikipedia.org") for historical reasons, should "nb" or "no" be used? If this property only is intended for creating links to Wikipedia, "no" is okay, but if it's also intended for e.g. determining the language for getting labels from Wikidata, it's not. Danmichaelo (talk) 06:24, 22 May 2016 (UTC)
- If you find the formatter url problematic, you might want to change or remove it.
--- Jura 06:45, 22 May 2016 (UTC) - Actually the Wikimedia code for "Norwegian" is effectively "no", even if it's deprecated in BCP47 in favor of "nb" or "nn". So the format is valid, as long as it is used to refer to Wikipedia, not for Wiktionary or other other projects that would use another URL. The same applies to the Wikimedia codes "simple", "zh-classical", "fiu-vro". They are not all valid according to BCP47, but they are "supported" by MediaWiki. As well "nrm" is still the Wikimedia code for Norman (to link to wikis), even if in BCP47 it should be "nrf".
- Don't confuse Wiki language codes (which are unparsable) with standard BCP 47 codes (that are parsable) used to classify translations in Wiktionary, i.e. in the content (that should all be BCP47), or to be used in the "lang=" attribute of HTML elements, or the "lang()" selector in CSS, or the "xml:lang=" pseudo-attribute in XML, or in all standards of the web, or in localisation codes in standard C/C or in ICU and other BCP47-conforming libraries.
- Wikimedia codes should be used only in WMF domain names for wikis, or in interwikis prefixes used from WMF wikis (they are still used also for "?uselang" to select a MediaWiki UI translation, but this should change independantly of the domain names/interwikis codes/internal wiki database names. Everywhere else we should replace them (e.g. "simple" would become "en-x-simple", "nrm" would become "nrf", "zh-classical" would become "lzh", "zh-min-nan" is still valid in BCP47 but it is deprecated and should be replaced now by "nan").
- Note that "sh" (Serbo-Croatian) is still valid in BCP47 even if it's now just a macrolanguage and if it has been dropped from ISO 639, and other ISO 639/BCP47 language codes are now prefered. Verdy p (talk) 20:18, 14 June 2017 (UTC)
- @Verdy_p:「"sh" (Serbo-Croatian) is still valid in BCP47」 please allow me to laugh for 3 days...
- In this claim, the sh.wikipedia.org should originally be hs.wikipedia.org isn't it? --Liuxinyu970226 (talk) 11:28, 16 July 2017 (UTC)
- This is perfectly TRUE. Not a laugh. Even if the code was withdrawn from ISO 639, it is standard in BCP 47 and has NOT been removed from the normative IANA registry of language subtags in BCP 47.
- This IANA registry effectively contains:
%% Type: language Subtag: sh Description: Serbo-Croatian Added: 2005-10-16 Scope: macrolanguage Comments: sr, hr, bs are preferred for most modern uses
- So you were confused between ISO 639 (which we actually don't use as it is unstable), and BCP 47 (which is THE standard actually used on the web and in all localization data; ISO 639 is now only used for bibliographic purposes by librarians for their archiving purpose (but with much more limited goals, with simplified classification), which change their mind and were unable to design a stable standard and unable to properly and precisely tag languages of the world) Serbo-Croatian remains a perfectly valid "macro-language" for BCP47, exactly like Chinese that was not withdrawn of course. ISO 639 should have been withdrawn completely: many librarians (including official national libraries) have stopped using or supporting it, in favor of BCP 47 which is much more precise.
- So sorry @Liuxinyu970226:, but I had to correct your evident ignorance and confusion. Verdy p (talk) 16:12, 16 July 2017 (UTC)
- Oh I see, there was an unwanted typo, with an inversion of letters. I did not want to say that "sh.wikipedia" would have to be renamed hs.wikipedia, but wanted to say that it was perfectly valid, and that localized data in Serbo-Croatian does not have to be removed (especially for non-current "modern" uses where sr, hr, bs were not separated some years ago for political reasons).
- Verdy p (talk) 16:27, 16 July 2017 (UTC)
Note that there's an on-going discussion on deletion of P794: Wikidata:Properties_for_deletion#P794. --Liuxinyu970226 (talk) 11:30, 16 July 2017 (UTC)
@Nikki, Jura1: ^^ --Liuxinyu970226 (talk) 22:12, 19 August 2017 (UTC)
- This is now deleted, so no more questions here. --Liuxinyu970226 (talk) 14:44, 25 November 2017 (UTC)
Wiktionary et al.
[edit]This property is used in Wikitionary items, for example French Wiktionary (Q22001373), and the language code is parsed into a link pointing to French Wikipedia. Is this a desired behaviour? Emijrp (talk) 14:41, 18 July 2017 (UTC)
zh-hk, zh-mo, zh-sg, zh-tw, zh-cn
[edit]We currently use the above for label languages, but these haven't been added to any items with P424 [1]. For completeness sake, it would be good if items would be created or these added to existing items.
--- Jura 11:06, 7 September 2017 (UTC)
target link
[edit]I think, linking to Wikipedia is a bad idea, as not all of languages that uses this property are having their Wikipedias, e.g. Sakizaya (Q718269) doesn't have, so is there any possible replacements available? --Liuxinyu970226 (talk) 12:04, 28 January 2018 (UTC)
- I agree, I would support replacing the formatter URL with something else. − Pintoch (talk) 12:52, 4 June 2019 (UTC)
- One suggestion: Can @SPQRobin:'s codelookup be used? (
https://tools.wmflabs.org/robin/?tool=codelookup&code=$1
) --Liuxinyu970226 (talk) 02:02, 28 January 2020 (UTC)
- One suggestion: Can @SPQRobin:'s codelookup be used? (
- Support it is a WMF code, not only WP code. Thank you, Liuxinyu970226 and Pintoch. MrProperLawAndOrder (talk) 14:12, 6 June 2020 (UTC)
- @Emijrp: you mentioned this already in 2017. MrProperLawAndOrder (talk) 14:14, 6 June 2020 (UTC)
- Changed to
https://robin.toolforge.org/?tool=codelookup&code=$1
. --Liuxinyu970226 (talk) 03:34, 5 August 2021 (UTC)
- Changed to
topics on the language codes/lists/all page
[edit]Curious if the language Wikimedia language code (P424) and its Help_talk:Wikimedia_language_codes/lists/all pages are being monitored where everal issues were noted. Thank you. jshieh (talk) 15:34, 22 February 2021 (UTC)
This item has a statement Wikimedia language code (P424) = es-419; even though it's valid (codelookup.toolforge.org), the current regex (|[a-z]{2,3}(-[a-z] ){0,2}|simple)
doesn't catch it. Either the format as a regular expression (P1793) should be updated or Latin American Spanish (Q56649449) should be added to exception to constraint (P2303).
The format constraint (Q21502404) should be updated anyway, as it doesn't match the as main value (Q54828448) statement of ([a-z]{2,3}(-[a-z] ){0,2}|simple)
in character 2 (VERTICAL LINE):
1c1
< (|[a-z]{2,3}(-[a-z] ){0,2}|simple)
---
> ([a-z]{2,3}(-[a-z] ){0,2}|simple)
(note, similar thing might apply to: Toki Pona Wikipedia (Q28970868), Yalálag Zapotec (Q8047534), Old Swedish (Q2417210) (where Wikimedia language code (P424) should be set to <unknown value> with qualifier subject named as (P1810) = mis-x-Q2417210
), Portuguese Language Orthographic Agreement of 1990 (Q1113432).
Thank you, 83.28.217.24 05:46, 16 August 2024 (UTC)