summaryrefslogtreecommitdiffstats
path: root/scripts/php_2_py.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/php_2_py.php')
-rw-r--r--scripts/php_2_py.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/php_2_py.php b/scripts/php_2_py.php
new file mode 100644
index 0000000..e53a535
--- /dev/null
+++ b/scripts/php_2_py.php
@@ -0,0 +1,21 @@
+<?php
+include("ZhConversion.php");
+
+echo "# -*- coding: utf-8 -*- \n";
+
+function printDict($name, $dict) {
+ echo "$name = {\n";
+ foreach($dict as $key => $val) {
+ echo " u\"", $key, "\": u\"", $val, "\",\n";
+ }
+ echo "}\n";
+ echo "\n";
+}
+
+printDict("zh2Hant", $zh2Hant);
+printDict("zh2Hans", $zh2Hans);
+printDict("zh2TW", $zh2TW);
+printDict("zh2HK", $zh2HK);
+printDict("zh2CN", $zh2CN);
+printDict("zh2SG", $zh2SG);
+?>