[wp-hackers] TinyMCE editor with no localization strings in WordPress

Leo Baiano ljunior2005 at gmail.com
Wed Apr 27 13:43:43 UTC 2011


 Partner, Good day! I followed the tips found on the link below developed as
a WordPress plugin and it worked perfectly, see if it can help you.

 http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/

2011/4/27 SWORD Studios <info at swordstudios.net>

> I've used this before
> http://wordpress.org/extend/plugins/tinymcecomments/ You should be
> able to reverse engine it from that plugin
>
> On Wed, Apr 27, 2011 at 9:17 AM, Carlo Gandolfo <carlo at artilibere.com
> >wrote:
>
> > Hello list,
> > I've got a problem with the WordPress editor.
> > I want to include it on a WordPress plugin but I cannot understand how to
> > load localization strings.
> > As you can see on the picture below I see the textual placeholder (as
> > 'advanced.underline_desc', 'advanced.fontdefault'...).
> >
> > Below that's how I coded. Where I was wrong?
> >
> > Thank you very much,
> > Carlo
> >
> > ----------------------------
> > add_action('init', 'optionsConfigStart', 1);
> > add_action('admin_footer', 'MCEditorReplacer');
> > ...
> > function optionsConfigStart(){
> >
> >
> >
>  wp_enqueue_script('tiny-mce',includes_url('js/tinymce').'/tiny_mce.js','','','',false);
> > }
> > ...
> > function MCEditorReplacer(){
> > include_once(ABSPATH.WPINC.'/js/tinymce/langs/wp-langs.php');
> >
> $mce_locale=(''==get_locale())?'en':strtolower(substr(get_locale(),0,2));?>
> > <script type="text/javascript">
> > tinyMCE.init({
> > theme : "advanced",
> >  mode: "exact",
> > skin: "wp_theme",
> >  language: "<?php echo $mce_locale;?>",
> > plugins : "paste",
> >  elements : "description_text",
> > theme_advanced_toolbar_location : "top",
> >  theme_advanced_buttons1 :
> > "bold,italic,underline,forecolor,fontselect,fontsizeselect,sub,sup,"
> > + "justifyleft,justifycenter,justifyright,justifyfull,",
> >  theme_advanced_buttons2 : "numlist,bullist,outdent,indent,"
> > + "cut,copy,pastetext,undo,redo,"
> >  + "link,unlink,anchor,hr,charmap,",
> > theme_advanced_buttons3 : "",
> >  height:"350px",
> > width:"740px"
> > });
> > </script>
> > <?php
> > }#end MCEditorReplacer
> >
> > ----------------------------
> > Picture attached: http://www.artilibere.net/language.png
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> >
>
>
> --
> *Jesse Friedman*   Founder / Lead Developer
> *SWORD Studios* | 508.50.SWORD info at swordstudios.net
> swordstudios.net @professor <http://twitter.com/professor>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Amplexos,

Leo Baiano
http://www.leobaiano.com
http://www.blog.ljunior.com
http://www.mcelebridades.com
http://www.twitter.com/leobaiano


More information about the wp-hackers mailing list