Using your comments, I found what I was missing. I initialized my textdomain with :
add_action('admin_init', 'related_post_shortcode_init');
function related_post_shortcode_init() {
load_plugin_textdomain('related-post-shortcode', false, basename( dirname( __FILE__ ) ) . '/i18n' );
}
So, the textdomain was ok and ready for back-office translations (admin_init
), but not for front, as @Mark Kaplun suggested.
I simply added another hook :
add_action('after_setup_theme', 'related_post_shortcode_init');
Related Posts:
- Shortcodes, output buffering, and WordPress functions
- How to make a WordPress plugin translation ready?
- PHP error with shortcode handler from a class
- Add self-closing shortcode button to TinyMCE in WP 4.6
- Optimize shortcode callbacks
- How to provide translations for a WordPress TinyMCE plugin?
- How would I create a plugin for my shortcodes?
- How to prevent newline from appearing in shortcode?
- Shortcode adding p and br tags
- Are shortcodes case-sensitive?
- Enqueue script only when shortcode is used, with WP Plugin Boilerplate
- Allowing for multiple template views on the Gallery Settings page when using the Visual Editor
- Preparing a string in an array for localization
- How to make WordPress use non-greedy shortcode parsing?
- Multiple Parameters for a Shortcode
- How do I make specific plugin functionality apply to different sites in a network?
- Filter on the_content ignores shortcodes
- Problems with localization
- Multiple textdomains
- How to properly load text domain of custom mu plugin
- stray elements
- Pass javascript result to shortcode executer function
- Front-End Form Submission in Shortcode
- `wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin
- How to get shortcode to work inside a foreach loop called within a shortcode?
- WordPress Localization and Templating
- Get returned variable from a function to add_shortcode function
- How to properly load text domain of custom mu plugin
- Can’t we use strings defined as PHP constants if we want to translate them in a plugin?
- How to update the language used by wordpress from a plugin
- WordPress: After Gutenberg plugin migration to block.json the localization/ translations with PolyGlot in JavaScript does not work anymore
- Singular name Plugin localization
- What is rich_editing?
- Why is my shortcode not working
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- On plugin deactivation hide its shortcode
- Can’t get JS code to work with shortcode
- add_shortcode is not working [duplicate]
- How can I render shortcode so that its not cached by Caching plugins?
- Is it possible to delay execution of shortcode output callback?
- Processing shortcodes in groups (separated by line breaks)?
- How to i18n text coming from the db or from an external source
- How do I write a shortcode that opens and closes?
- Using a Shortcode to Replace Themes Stylesheet?
- Should I always prefer esc_attr_e & esc_html_e instead of _e?
- Some strings from a .mo file do not load
- Should shorcodes in i18n plugins be translated and if so, how?
- A better way to include localized labels in WordPress plugins
- How to render a time-of-day string like ’16:42′ with a site’s chosen time format?
- Frontend language per user
- Gutenberg Block showing invalid content on edit
- Creating a shortcode, but getting tied up with OOP and Classes?
- Storing product price data in the database
- What is the best way to embed an JS App in a WordPress Page?
- What is the proper way to include Bootstrap when executing a shortcode
- Auto gallery from folder contents
- Secure Pages Best Practice
- Adding option to Gallery shortcode
- add_shortcode() not working inside of function
- Generate JSON files for language translation from po file without wp-cli i18n make-json
- Asynchronously render shortcodes in TinyMCE visual editor
- Custom login doesn’t work properly
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Run Shortcode of post’s custom field in functions.php / Plugin
- load_plugin_textdomain doestn’t work with add_action plugins_loaded
- Hide shortcodes “code” when using the “editor” the same as wordpress do with “gallery”
- Enumerating shortcode attributes in JavaScript
- Wrap text around shortcode
- wp_nonce_field displaying twice
- How to handle shortcodes through plugin
- Using a custom shortcode from within the template of a shortcode plugin
- When echoing my own shortcode, it keeps adding a 1 at the end of my blogpost
- How to prevent someone from entering strings without making it available for translation?
- Automating the process of shortcode generation in a plugin – how is it done?
- I18n not working in plugin
- Create Widget or Enable Shortcodes in Sidebar
- Mixing l18n string from my plugin with WordPress’ translations
- shortcode executed in the page editor
- Shortcode not appearing when used as post content in wp_insert_post() or possibly, shortcode not being registered at all
- How to make my shortcode load scripts and styles, from within the plugin?
- Plugin language always shows WP site language, not profile language
- Is hint for translator compulsory while internationalizing a string containing variables?
- How to display the categories on page using shortcode?
- Shortcode conflicts
- How to create ShortCode
- How to display the specific post content by using POST ID
- How to output functions from plugin inside theme
- add_filter img_caption_shortcode not implemented
- shortcode tags not working in do_shortcode
- How to insert HTML/CSS/JS into my iframe plugin?
- Including template in shortcodes
- Form submission to another page returning 404 error [duplicate]
- Passing values between enclosing and enclosed shortcodes
- post content and shortcode content displaying out of order
- Font size of HTML content
- Cannot output plugin twice with shortcode
- Paragraph Tags removed when contents are only a shortcode
- How to call a function from a shortcode function in an oop plugin
- WPGut – Updating failed and shortcode?
- Do I lose translations when I change my Text domain for my plugin on wp.org?