Skip Navigation
availability:

WPML Version: 3.2

description:

Returns TRUE or FALSE if a given language has been enabled.

type:
filter
category:
Site-Wide Language Information
parameters:
apply_filters( 'wpml_language_is_active', mixed $empty_value, string $language_code )
$empty_value
(mixed) (Required) This is normally the value the filter will be modifying. We are not filtering anything here so set this to NULL. This for the filter function to actually receive the full argument list
$language_code
(string) (Required) The language code to check. Accepts a 2-letter code like ‘en’
hook example usage:

Example

// $is_german_enabled will return TRUE if German is enabled and FALSE if not
$is_german_enabled = apply_filters( 'wpml_language_is_active', NULL, 'de' );