File: php_2_py.php

package info (click to toggle)
ibus-libpinyin 1.6.92-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,336 kB
  • ctags: 1,109
  • sloc: python: 22,254; cpp: 15,057; ansic: 840; makefile: 468; awk: 30; sh: 24; php: 16
file content (21 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
?>