diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/php_2_py.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/php_2_py.php b/scripts/php_2_py.php new file mode 100644 index 0000000..aa3316e --- /dev/null +++ b/scripts/php_2_py.php @@ -0,0 +1,24 @@ +<?php + +namespace MediaWiki\Languages\Data; + +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", ZhConversion::$zh2Hant); +printDict("zh2Hans", ZhConversion::$zh2Hans); +printDict("zh2TW", ZhConversion::$zh2TW); +printDict("zh2HK", ZhConversion::$zh2HK); +printDict("zh2CN", ZhConversion::$zh2CN); +# printDict("zh2SG", ZhConversion::$zh2SG); +?> |