1ac746de6f3077d4046a14df45cb88f296906841
[lhc/web/wiklou.git] / maintenance / language / digit2html.php
1 <?php
2 /**
3 * @file
4 * @ingroup MaintenanceLanguage
5 */
6
7 require_once( dirname(__FILE__).'/../commandLine.inc' );
8
9 # A list of unicode numerals is available at:
10 # http://www.fileformat.info/info/unicode/category/Nd/list.htm
11 $langs = array( 'Ar', 'As', 'Bh', 'Bo', 'Dz', 'Fa', 'Gu', 'Hi', 'Km', 'Kn', 'Ks', 'Lo', 'Ml', 'Mr', 'Ne', 'New', 'Or', 'Pa', 'Pi', 'Sa' );
12
13 foreach( $langs as $code ) {
14 $filename = Language::getMessagesFileName( $code );
15 echo "Loading language [$code] ... ";
16 unset( $digitTransformTable );
17 require_once( $filename );
18 if( !isset( $digitTransformTable ) ) {
19 print "\$digitTransformTable not found\n";
20 continue;
21 }
22
23 print "OK\n\$digitTransformTable = array(\n";
24 foreach( $digitTransformTable as $latin => $translation ) {
25 $htmlent = utf8ToHexSequence( $translation );
26 print "'$latin' => '$translation', # &#x$htmlent;\n";
27 }
28 print ");\n";
29 }