Back to index

php5  5.3.10
example1.php
Go to the documentation of this file.
00001 <?php
00002 $tag = 'en_US';
00003 $r = enchant_broker_init();
00004 $bprovides = enchant_broker_describe($r);
00005 echo "Current broker provides the following backend(s):\n";
00006 print_r($bprovides);
00007 
00008 
00009 if (enchant_broker_dict_exists($r,$tag)) {
00010        $d = enchant_broker_request_dict($r, $tag);
00011        $dprovides = enchant_dict_describe($d);
00012        echo "dictionary $tag provides:\n";
00013        $spellerrors = enchant_dict_check($d, "soong");
00014        print_r($dprovides);
00015        echo "found $spellerrors spell errors\n";
00016        if (spellerrors) {
00017               $suggs = enchant_dict_suggest($d, "soong");
00018               echo "Suggestions for 'soong':";
00019               print_r($suggs);
00020        }
00021        enchant_broker_free_dict($d);
00022 } else {
00023 }
00024 enchant_broker_free($r);
00025 ?>