Skip to content

Commit 8b52ba4

Browse files
authored
[Sync EN] Fix collator::setAttribute example (#2758)
Remplacement de l'exemple (qui appelait en realite collator_get_attribute) par un appel explicite a collator_set_attribute, coherent avec la fonction documentee. Fixes #2749
1 parent 3b36551 commit 8b52ba4

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

reference/intl/collator/set-attribute.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: 1976eae0d815797af97a1e16c5cd90ffc2868395 Maintainer: yannick Status: ready -->
2+
<!-- EN-Revision: 0194deb3cec8d79ae6b13700f3cd031d14597838 Maintainer: lacatoire Status: ready -->
33
<!-- Reviewed: no -->
44
<refentry xml:id="collator.setattribute" xmlns="http://docbook.org/ns/docbook">
55
<refnamediv>
@@ -77,13 +77,8 @@
7777
<programlisting role="php">
7878
<![CDATA[
7979
<?php
80-
$coll = collator_create( 'en_CA' );
81-
$val = collator_get_attribute( $coll, Collator::NUMERIC_COLLATION );
82-
if ($val === false) {
83-
// Gestion d'erreur.
84-
} elseif ($val === Collator::ON) {
85-
// Quelque chose d'utile
86-
}
80+
$coll = collator_create('en_CA');
81+
collator_set_attribute($coll, Collator::NORMALIZATION_MODE, Collator::ON);
8782
?>
8883
]]>
8984
</programlisting>

0 commit comments

Comments
 (0)