mce_external_languages WordPress Filter Hook

The mce_external_languages WordPress hook allows you to add external language files to the WordPress visual editor. This is useful if you want to add a language that is not currently supported by WordPress.

apply_filters( 'mce_external_languages', array $translations, string $editor_id ) #

Filters the translations loaded for external TinyMCE 3.x plugins.


Description

The filter takes an associative array (‘plugin_name’ => ‘path’) where ‘path’ is the include path to the file.

The language file should follow the same format as wp_mce_translation(), and should define a variable ($strings) that holds all translated strings.


Top ↑

Parameters

$translations

(array)Translations for external TinyMCE plugins.

$editor_id

(string)Unique editor identifier, e.g. 'content'.


Top ↑

Source

File: wp-includes/class-wp-editor.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.3.0The $editor_id parameter was added.
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.