mce_external_languages: how does it really work?

Ok for everyone else’s benefit this is what is not explained in the documentation:

  1. You need to specify a textdomain anyway in your plugin (and together with it the path to the directory containing the language files, as usual).
  2. The PHP file used for the translation should contain an array like:

    $strings = array(
        'string1' => esc_js( __('Your text 1', 'your_textdomain') ),
        'string2' => esc_js( __('Your text 2', 'your_textdomain') ),
    );
    
  3. Now you can use tools like Poedit to get the master file you will use for the translations.

  4. The translations (.MO) must be included in the languages folder as per point 1 above.

Cheers!