summaryrefslogtreecommitdiff
path: root/maintenance/language/digit2html.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/language/digit2html.php')
-rw-r--r--maintenance/language/digit2html.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/maintenance/language/digit2html.php b/maintenance/language/digit2html.php
new file mode 100644
index 00000000..3b690461
--- /dev/null
+++ b/maintenance/language/digit2html.php
@@ -0,0 +1,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";
+}