mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Update broker_set_ordering.phpt
This commit is contained in:
parent
018c412b5c
commit
c2bc106608
1 changed files with 5 additions and 3 deletions
|
@ -5,16 +5,18 @@ marcosptf - <marcosptf@yahoo.com.br>
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php
|
<?php
|
||||||
if(!extension_loaded('enchant')) die('skip, enchant not loader');
|
if(!extension_loaded('enchant')) die('skip, enchant not loader');
|
||||||
|
if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
|
||||||
|
if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$broker = enchant_broker_init();
|
$broker = enchant_broker_init();
|
||||||
$lang = "us_US";
|
$dicts = enchant_broker_list_dicts($broker);
|
||||||
$comma = ";";
|
$comma = ";";
|
||||||
|
|
||||||
if (is_resource($broker)) {
|
if (is_resource($broker)) {
|
||||||
echo("OK\n");
|
echo("OK\n");
|
||||||
if (enchant_broker_set_ordering($broker,$lang,$comma)) {
|
if (enchant_broker_set_ordering($broker,$dicts[0]['lang_tag'],$comma)) {
|
||||||
echo("OK\n");
|
echo("OK\n");
|
||||||
} else {
|
} else {
|
||||||
echo("enchant failed ==>" . $enchantErr);
|
echo("enchant failed ==>" . $enchantErr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue