Skip Navigation

WPML Version: 3.2


Returns the translated name of a language in another specified language.

*Note: The languages involved do not need to be active for the site

Site-Wide Language Information
apply_filters( 'wpml_translated_language_name', mixed $empty_value, string $lang_code, string $display_code )
(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
(string) (Required) The language name will be for this language. Accepts a 2-letter code e.g. en
(string|bool) (Optional) The language name will display translated in this language. Accepts a 2-letter code e.g. de. If set to false it will return the translated name in the current language. Default is FALSE.
hook example usage:

A basic example

// will return the translation for 'Italian' in Greek
echo apply_filters( 'wpml_translated_language_name', NULL, 'it', 'el' );