com presentations: Update old ICU/PHP 6 slides: slides/i18nl10n/locale-example-arrays.xml slides/i18nl10n/locale-example2.xml

[email protected] (Derick Rethans)
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    e1ea2ddb59f169472df9359bf062e706be341860
Author:    Derick Rethans <[email protected]>         Sat, 21 Mar 2015 11:44:45 +0100
Parents:   c94521ecfb8ebbdcc71ad6712e1b3ad6c068152c
Branches:  master

Link:       http://git.php.net/?p=presentations.git;a=commitdiff;h=e1ea2ddb59f169472df9359bf062e706be341860

Log:
Update old ICU/PHP 6 slides

Changed paths:
  M  slides/i18nl10n/locale-example-arrays.xml
  M  slides/i18nl10n/locale-example2.xml


Diff:
diff --git a/slides/i18nl10n/locale-example-arrays.xml b/slides/i18nl10n/locale-example-arrays.xml
index b3ea774..aeab300 100644
--- a/slides/i18nl10n/locale-example-arrays.xml
+++ b/slides/i18nl10n/locale-example-arrays.xml
@@ -1,21 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
 <slide fontsize="6em">
-	<title>ICU Locales</title>
-	<subtitle>Array Sorting Example</subtitle>
+	<title>Array Sorting Example</title>
 
 	<example result='1'><![CDATA[<pre>#  orig  norm  loc   trad
 --------------------------
 <?php
-	$d = $c = $b = $a = array('mapa', 'kilo', 'libro', 'llave', 'loca');
-	sort($b);
-	locale_set_default('es_VE');
-	sort($c, SORT_LOCALE_STRING);
-	locale_set_default('es_VE@collation=traditional');
-	sort($d, SORT_LOCALE_STRING);
+$d = $c = $b = $a = array('mapa', 'kilo', 'libro', 'llave', 'loca');
+sort($b);
+$col1 = new Collator('es_VE');
+$col1->sort($c);
+$col2 = new Collator('es_VE@collation=traditional');
+$col2->sort($d);
 
-	for ($i = 0; $i < 5; ++$i) {
-		echo sprintf('%d. %-5s %-5s %-5s %-5s<br/>',
-			$i + 1, $a[$i], $b[$i], $c[$i], $d[$i]);
-	}
+for ($i = 0; $i < 5; ++$i) {
+	echo sprintf('%d. %-5s %-5s %-5s %-5s<br/>',
+		$i + 1, $a[$i], $b[$i], $c[$i], $d[$i]);
+}
 ?>]]></example>
 </slide>
diff --git a/slides/i18nl10n/locale-example2.xml b/slides/i18nl10n/locale-example2.xml
index 6c14945..ba807b9 100644
--- a/slides/i18nl10n/locale-example2.xml
+++ b/slides/i18nl10n/locale-example2.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <slide fontsize="6em">
-	<title>ICU Locales</title>
-	<subtitle>Example</subtitle>
+	<title>Locales — example</title>
 
 	<blurb>Comparing strings:</blurb>
 	<example result='1'><![CDATA[<?php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.