Translating the TinyMCE WYSIWYG editor in WP2 (3 posts)

  1. Bricolou
    Posted 10 years ago #

    I found a way to translate the tags into other languages.
    In "wp-includes/js/tinyMCE" and its subdirectories find the
    "en.js" files, translate and rename them with your country code
    fr.js, de.js, etc.
    Go back to the "wp-includes/js/tinyMCE" directory and open
    On lines 80 et 81, find "langs/en.js" and change "en for your
    country code, for example "langs/fr.js"
    This should be changed on both lines:
    echo wp_translate_tinymce_lang(file_get_contents(realpath("themes/" . $theme . "/langs/fr.js")));
    echo wp_translate_tinymce_lang(file_get_contents(realpath
    Save and refresh your page. The translation should work.

  2. Matt Mullenweg
    Posted 10 years ago #

    You should be able to translate everything through gettext, as all the JS is loaded through a script and gettexted before display.

  3. pandem
    Posted 10 years ago #

    Then how do we generate a .po file from the JS? I mean, if the strings are gettexted on loading, there's no file we can use to create the .po and .mo files we need for translation, am I wrong?

Topic Closed

This topic has been closed to new replies.

About this Topic