Assuming the plugin makes use of localization at all, you could for example try exchanging the possible load_plugin_textdomain
call with load_textdomain
where you can point to the file you like.
A cleaner way would be using the plugin_locale
filter that let’s you modify the locale used by a plugin:
function my_plugin_locale_filter($locale, $domain)
{
if($domain === 'the_plugins_textdomain')
{
return 'cy_CY';
}
return $locale;
}
add_filter('plugin_locale', 'my_plugin_locale_filter', 10, 2);
That way the plugin can more or less safely be updated without the custom code being overwritten.
Related Posts:
- How to keep plugin translations after updates?
- Edit plugin without hooks in functions.php
- How to use load_plugin_textdomain from within a theme
- Why load_textdomain work but not load_plugin_textdomain?
- Language Translation is not working?
- allow arabic letters when register new account
- WordPress language switcher
- How to set a custom title per language?
- Possible to add a language file to a plugin without adding .po/.mo files to plugin directory?
- load_theme_textdomain path
- Change the backend language of a single plugin
- WordPress change Language not working
- Force language in translate function
- Display site language setting in source code
- How to handle a WordPress blog with articles in different languages?
- Language translation on a fresh english installation
- Change language in SiteOrigin Widgets
- I have English words in Kurdish pages
- How to translate wordpress blog to other languages?
- How to change WordPress core language using Loco Translate?
- WPML – Hook when language is switched (change user language)
- How do I add languages?
- Function get_locale always returns en_US in plugin?
- How do I change a plugin language of only one page?
- Translation plugin with default language?
- Change localization only for plugin
- How to get the list of languages provided by a plugin
- WordPress Site in Multiple Languages
- GTranslate Plugin – Showing Different Codes With if-else
- Why is it important to deactivate a plugin before deleting it?
- Membership / subscription plugins – alternatives [closed]
- Using plural-only translation of register_post_status() in plugin
- admin-ajax returning 400 error when request is made with Fetch API
- Function to activate WordPress theme inside a plugin
- How do I retrieve a list of popular plugins using the WordPress.org Plugin API?
- Edit Imported advanced Custom Fields from wordpress Dashboard
- Restrict access and display for categories
- What is the correct way to check if WP_Filesystem can write to a directory without aking for username / password?
- Manually Removing Plugins
- Change My Basket text in the header of WooCommerce Artificer theme
- ACF for audio url in wordpress audio shortcode
- Built in admin ajax hooks?
- recommended breadcrumb plugins with possibility for hiding “Home” link [closed]
- dequeue not work
- Manually installed plugin doesn’t show up
- Could someone please help me to add category id with in this query so this will return posts from a certain category?
- Adding a section to admin menu for global settings
- Copyright messages for a particular set of pages
- building plugin and it is displaying above plugins page
- More than one text-domain is being used because of the included templates for plugins
- plugin development: problem with functions
- View Private Published Page with URL Code (no login required)
- Why does my functions.php cause white-screen and media-library issues?
- Solutions to repost categories into multisite blogs?
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- Added slug after URL permalink last slash returns different content
- How to escape the tailwindcss responsive syntax when using with contact form 7? [closed]
- Send reply with pre-prepared answers
- Using Wishlist Member and I need to access a user’s status
- $wpdb->get_row returns column name instead of column value
- How to get DEFER or ASYNC attribute to appear when I add a stylesheet with wp_enqueue_style from a plugin? [duplicate]
- Excluding private/protected posts via IP
- How to use login_redirect with a user capability
- I should enable automatic updates?
- Form that generates an ID for the customer
- Access a particular field in an array
- plugin shortcode not working on ajax request call
- Ajax Plugin Not Echoing Response
- Different custom templates for product category [closed]
- How to check wp_options’s rewrite_rules if current and existing are the same before flush the rules?
- is_rtl returns false while it should return true
- Can i legally remove a credit from a free plugin on wordpress.org? [closed]
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Woocommerce product info in a sidebar?
- Localise settings section headline
- wp_options not returning value for logged out users?
- Gutenberg default attributes are empty when accessing in edit
- how to create a custom page in child theme or plugin?
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function
- Hide all Admin Notices and move on a separate page
- Front Page of Site Has Gone Replaced By Random Page
- Genesis Child Theme – Customize body
- Creating categories while importing via CSV
- Multiple wordpress installations with same plugin folder (Apache Virtualhost)
- Website content not displayed anymore after updates
- Flexslider empty slide
- WordPress plugin changes not updating
- Issue: CSV file upload works only when “View page source” is done
- Meta box: Undefined index
- How to update plugins in a distributed wordpress scenario?
- Shortcode registered from a plugin not recognized
- wordpress shortcode A executing code from shortcode B
- Plugin for Reading Documents, PDF’s etc
- Simple Data Table Update and Page Integration
- Show latest and related articles from 3 different blogs
- Woocommerce custom fields
- This plugin throws error on the events page only [closed]
- PHP if url extension action=discussion condition use [closed]
- Is it possible to set different payment gateway on each Gravity Forms form? [closed]