Seems like you forgot to load the text domain
The plugin handbook says that:
You need to load the MO file with your plugin’s translations. You can
load them by calling the function
load_plugin_textdomain()
(and
load_muplugin_textdomain()
if your plugin will be used as a Must-Use plugin). This call loads
{text-domain}-{locale}.mofrom your plugin’s base directory.
So based on the example there, you could add this to your main plugin file (test.php):
function test_load_plugin_textdomain() {
load_plugin_textdomain( 'test', false, basename( __DIR__ ) . '/languages/' );
}
add_action( 'plugins_loaded', 'test_load_plugin_textdomain' );
Related Posts:
- Quick edit screen customization
- Mini-Site Strategy
- Prevent trash/delete action on specific post types
- How to add custom content template part for a custom post type on main query using a plugin
- Loading custom page template via plugin
- Why The Init Hook For Custom Post Types
- wordpress plugin error handling
- How to get term link that crosses different custom post types?
- register_taxonomy with multiple object type and update_count_callback
- How often do you need to register_post_type?
- Where to put archive-{post-type}.php
- How to use a dedicated template for the Custom Post Type from a plugin?
- Determine which template-{slug}.php is being loaded
- How to append text to title of Custom Post Type post (without affecting all titles on page)?
- Remove POST_TYPE from custom post type permalink
- Use a textarea for a custom post type
- Make custom post type display as a page
- How do I include drag-and-drop in a plugin?
- How could I create a ‘private comments’ section on a custom post type?
- How to rename image at uploading on specific plugin or post-type in WordPress
- How do I alter the position of a Custom Post Type menu item within my plugin admin menu?
- Custom Post Type Navigation on Custom Field
- Get rewrite slug of custom post type in template
- Metadata for a taxonomy – is there any WordPress way of doing this?
- Hook to override title, image and content
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- get_object_taxonomies() returns empty array for custom post type
- No posts found – Custom Post Type show_ui
- WordPress multiple custom post types capability conflict in a single menu
- Unable to get Custom Plugin Options data
- Add Custom Post type menu to another menu in specific location
- Set a CPT slug as a base name for all the taxonomies
- A custom post type in another post type
- Plugin fatal error
- Suggestion on custom post type/ taxonomy relationship
- Custom Empty Results page for my Custom Post Type
- ACF in wordpress
- Theme independent plugin by using default page template
- How do you make a list and list item relation if custom post types?
- Add form after woocommerce admin order edit
- Unable to format dates to put in event calendar
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- Dynamic assign a custom template to custom post type posts
- Custom post type in Custom widget – $listItem
- Validate Custom Post Type fields
- Is it possible to sort metabox teaxtarea values?
- Generating and downloading files with WP API
- Convert Custom Table Data Based Plugin To Be Searchable
- Modify a plugin function output from another plugin
- Custom rewrite rules for /pastissues/%category%-%postname%.html
- Content in WP Editor displayed below CPT shortcode [duplicate]
- Writing a custom Glossary plugin
- Limit Amount of Pages users can create in Custom Post Types
- restricting custom rewrite to just one custom post type
- Wp Meta Query does not work while simple Query Works
- Change Text in Admin Panel
- allowing custom user role to access custom post type in wordpress admin
- How to show Custom Post Types under Taxonomy in a new WordPress page template?
- Custom Endpoint For Specific Custom Post Type
- How to add a default predefined thumbnail when creating a brand new post?
- Plugin Development using classes – Public & Private Callbacks
- Create a post automatically if search result has zero results
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- How to display the post using a shortcode in WordPress?
- Custom post type specific item design
- Correct way adding External classes to Custom Post type and output their methods to template
- Issue removing columns from admin table
- Shortcode and get_template_part
- dynamic vue widget inside custom post
- Custom Post Type Front Page Gives 404
- Getting data from dynamically allocated metaboxes within a custom post
- WP REST API Custom endpoint don’t work in my plugin
- Insert custom taxonomy into category query
- get_permalink() of page the enclosing page not posts
- Run query on specific admin options page and send results to select field in another function
- Not able to get all the actions (View, Edit, Quick Edit, Trash), and not able to delete post in custom post type
- how to allow subscriber to add/edit/delete custom post type
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- Custom meta box in editor of custom post type not working
- WP_Query doesn’t accept Category ID
- Error in WP Query. If variable is empty it is displaying previous post value
- what file is required to be created in plugin folder in order to show all the post content of a CPT with the help of permalink
- Remove Custom Capability
- Can I override the permalink/slug on creation
- call_user_func_array() error after moving to another server
- Custom post type not being pulled in widget
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Issue on Counting CPT’s Under Taxonomy Term
- Custom Taxonomy Showing in WP Menu
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Add Excerpt On Quicksand Plugin
- Custom Post Types in plugins?
- How to apply order on custom taxonomy and custom meta key on custom post type
- Inserting into WP DB
- Hide custom post type and use its slug in new plugin menu
- Don’t display post if post has empty body
- Create settings page to enable or disable CPT
- How to filter custom post data with AJAX?
- I want to show a list of posts under specified categories
- How to consume external API from WordPress post editor and display the response data in the custom field?