enchant_broker_dict_exists

(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL enchant >= 0.1.0 )

enchant_broker_dict_exists — Verifica si un diccionario existe

Descripción

function enchant_broker_dict_exists(EnchantBroker $broker, string $tag): bool

Verifica si un diccionario existe.

Parámetros

broker

Un broker Enchant devuelto por enchant_broker_init().

tag

lenguaje, en un formato como us_US, ch_DE, etc.

Valores devueltos

Devuelve true si el lenguaje existe, false en caso contrario.

Errores/Excepciones

Lanza un ValueError si broker no es utilizable, por ejemplo si no está inicializado o ya ha sido liberado con enchant_broker_free().

Lanza una ValueError si tag está vacío.

Historial de cambios

Versión Descripción
8.5.0 Ahora lanza una ValueError si tag está vacío.
8.0.0 broker ahora espera una instancia de EnchantBroker; anteriormente, se esperaba un resource.

Ejemplos

Ejemplo #1 Ejemplo con enchant_broker_dict_exists()

<?php
$tag = 'en_US';
$r = enchant_broker_init();
if (enchant_broker_dict_exists($r,$tag)) {
    echo "Diccionario " . $tag . " encontrado.\n";
}
?>

Véase también

+add a note

User Contributed Notes

There are no user contributed notes for this page.