Translate MCE button text/tooltip in custom plugin

Create js file button.js and add js directory and list-btn.png needed (function() { tinymce.create(“tinymce.plugins.listbuttons_button_plugin”, { //url argument holds the absolute url of our plugin directory init : function(ed, url) { //add new button ed.addButton(“listbuttons”, { title : “Add Related post shortcode”, cmd : “listbuttons_command”, image : “images/list-btn.png” }); ed.addCommand(“listbuttons_command”, function() { var return_text = “[related]”; … Read more

How do I troubleshoot translation issues?

To get ‘Archives’ translated in your text domain you have to load a theme translation .mo file. The file in /wp-content/languages/sv_SE.po will not be used for that. Create a directory languages in your theme. Add the translations for the theme to that directory. I recommend the Codestyling Localization plugin for that. Load the theme translations … Read more

what’s different between _x() and _()

_x() let’s you add a context to your strings. This is useful when you are using the same string in different places. This string may need different translations depending on the language. Your example would be : echo ‘a1 in context 1 ‘ . _x(‘a1’, ‘context1’, ‘mydomain’); echo ‘a1 in context 2 ‘ . _x(‘a1’, … Read more

Translating plugin or locale file

Lots of plugins exist for human translation (as distinct from automatic machine translation). Here’s a blog post that lists and compares some of the best ones: http://www.wpmayor.com/plugin-reviews/best-wordpress-translation-plugins/ In my personal experience, WordPress Multilingual seems to be the most solid one for a long-term commitment: http://wpml.org. They have a few different price options (including free for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)