1
vote
2answers
52 views

Making my plugin translation ready. Poedit not working

I'm building a plug-in which is going great so far. I want to start making it localization ready. I don't know what is going wrong, but it's bugging out on me when I try to load it in Poedit. So ...
0
votes
2answers
59 views

I18n not working in plugin

I'm sure I'm making a dumb mistake, but I don't for the life of me know what it might be. I recently converted one of my larger plugins to utilize I18n (my first time doing so for any of my plugins). ...
1
vote
1answer
56 views

A better way to include localized labels in Wordpress plugins

is there a better way to include labels to be localized in Wordpress plugins and themes? My current setup involves calling the method below to get the labels: public function plug_get_labels(){ ...
0
votes
1answer
111 views

Multiple textdomains

I have a bunch of plugins. Obviously, they all have their own unique textdomains for internationalization (i18n). I also have a bunch of files that I include in all my plugins - I throw them all in a ...
1
vote
0answers
50 views

Wordpress Localization and Templating

I'm using Smarty Templates for the back-end and Handlebars for the front-end for the plugin that I'm building. It's only now that I discovered that the localization doesn't work when I declare my ...
0
votes
1answer
800 views

Shortcodes, output buffering, and WordPress functions

I have a couple of long forms which I want to output as shortcodes. Shortcode API indicates that If the shortcode produces a lot of HTML then ob_start can be used to capture output and convert ...
0
votes
2answers
102 views

How to update the language used by wordpress from a plugin

I'm trying to create a plugin that will be able to translate language used in wordpress. Here's my current code: add_action('plugins_loaded', function(){ load_plugin_textdomain('ecom', false, ...
5
votes
1answer
4k views

How to make a WordPress plugin translation ready?

What is the best way create a plugin that is translation ready? It doesn't have to be translated from the beginning but it has to be easily translatable so fellow developers from different cultures ...
1
vote
2answers
105 views

How to i18n text coming from the db or from an external source

I'm writing a plugin and i wanted to i18n correctly text which i'm storing in the db or in an external file. How should i do that?As of now we are generating pot files with wordpress and so all the ...
2
votes
0answers
79 views

Singular name Plugin localization

I'm trying to localize the singular name of a custom post type. ... 'singular_name' => __('key', 'plugindomain') ... I created a .po and compiled it as .mo. I also loaded the translation using ...
1
vote
1answer
1k views

Why load_textdomain work but not load_plugin_textdomain?

In my plugin's init function load_textdomain( 'myplugin', ABS_PATH_TO_MO_FILE ); // OK load_plugin_textdomain( 'myplugin', false, ABS_PATH_TO_LANGS_DIR); // No effect echo( __('Test', ...
5
votes
2answers
1k views

How to provide translations for a WordPress TinyMCE plugin?

I know that I can get my translations into JavaScript doing: $MyTranslations = array( 'translation1' => __("Some String 1", "MyTranslations"), 'translation2' => __("Some ...
0
votes
1answer
96 views

Mixing l18n string from my plugin with WordPress' translations

I recently asked a question about l18n for WordPress terms like "Taxonomy", "Plugin", "Custom Post Type", etc. I was wanting to get some input on whether to translate these terms or not. Scribu made a ...
3
votes
1answer
477 views

Preparing a string in an array for localization

I'm working on a WordPress plugin and want to make sure that all text that is displayed is prepared for localization. I'm having trouble localizing the text that resides inside an array. For ...