*
* This is just a naive check to make sure it somewhat looks like a lang code.
*
- * @see rfc 3066
- * @see http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf page 30 (section 8.2.2.5)
+ * @see BCP 47
+ * @see https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/
+ * XMP%20SDK%20Release%20cc-2014-12/XMPSpecificationPart1.pdf page 22 (section 8.2.2.4)
*
* @param array $info Information about current property
* @param mixed &$val Current value to validate
}
/**
- * Get the RFC 3066 code for this language object
+ * Get the internal language code for this language object
*
* NOTE: The return value of this function is NOT HTML-safe and must be escaped with
* htmlspecialchars() or similar
}
/**
- * Get the code in Bcp47 format which we can use
+ * Get the code in BCP 47 format which we can use
* inside of html lang="" tags.
*
* NOTE: The return value of this function is NOT HTML-safe and must be escaped with
class WfBCP47Test extends MediaWikiTestCase {
/**
* test @see wfBCP47().
- * Please note the BCP explicitly state that language codes are case
+ * Please note the BCP 47 explicitly state that language codes are case
* insensitive, there are some exceptions to the rule :)
* This test is used to verify our formatting against all lower and
* all upper cases language code.
*/
public static function provideLanguageCodes() {
return [
- // Extracted from BCP47 (list not exhaustive)
+ // Extracted from BCP 47 (list not exhaustive)
# 2.1.1
[ 'en-ca-x-ca', 'en-CA-x-ca' ],
[ 'sgn-be-fr', 'sgn-BE-FR' ],
'en-Latn-GB-boont-r-extended-sequence-x-private'
],
- // Examples from BCP47 Appendix A
+ // Examples from BCP 47 Appendix A
# Simple language subtag:
[ 'DE', 'de' ],
[ 'fR', 'fr' ],
[ 'de-ch-x-phonebk', 'de-CH-x-phonebk' ],
[ 'az-arab-x-aze-derbend', 'az-Arab-x-aze-derbend' ],
/**
- * Previous test does not reflect the BCP which states:
+ * Previous test does not reflect the BCP 47 which states:
* az-Arab-x-AZE-derbend
* AZE being private, it should be lower case, hence the test above
* should probably be: