summaryrefslogtreecommitdiff
path: root/maintenance/language/digit2html.php
blob: 3b6904613fdf6f763b15271944571b7f11a132b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
require( '../commandLine.inc' );

# A list of unicode numerals is available at:
# http://www.fileformat.info/info/unicode/category/Nd/list.htm
$langs = array( 'Ar', 'As', 'Bh', 'Bo', 'Dz', 'Fa', 'Gu', 'Hi', 'Km', 'Kn', 'Ks', 'Lo', 'Ml', 'Mr', 'Ne', 'New', 'Or', 'Pa', 'Pi', 'Sa' );

foreach( $langs as $code ) {
	$filename = Language::getMessagesFileName( $code );
	echo "Loading language [$code] ... ";
	unset( $digitTransformTable );
	require_once( $filename );
	if( !isset( $digitTransformTable ) ) {
		print "\$digitTransformTable not found\n";
		continue;
	}

	print "OK\n\$digitTransformTable = array(\n";
	foreach( $digitTransformTable as $latin => $translation ) {
		$htmlent = utf8ToHexSequence( $translation );
		print "'$latin' => '$translation', # &#x$htmlent;\n";
	}
	print ");\n";
}