There was a syntax error in loading the WooCommerce translations and I managed to get the parent theme translations working by following the same method I used for the WooCommerce translations.
function weg_localisation() {
unload_textdomain( 'woothemes' );
load_textdomain('woothemes', get_stylesheet_directory() . '/lang/af_AF.mo');
unload_textdomain('woocommerce');
load_textdomain('woocommerce', get_stylesheet_directory() . '/woocommerce/i18n/languages/woocommerce-af_AF.mo');
}
add_action('init', 'weg_localisation');
Related Posts:
- Override plugin text domain in child theme
- Translate a plugin using .po .mo files
- Can I leave off plugin textdomain for terms used in core?
- Overriding Plugin Template Files with Child Theme
- How do I cleanly override a plugin’s CSS with a child theme?
- Using plural-only translation of register_post_status() in plugin
- Override plugin localization
- Function to activate WordPress theme inside a plugin
- Internationalization and the plugin description
- How can I translate the name of my Plugin for other languages?
- Is it necessary to translate WordPress key terms when localizing a plugin
- Plugin readme.txt and assets internationalization
- How do you auto-activate plugins from child themes
- Translate third party plugin and save translation files in custom theme
- How to load all plugins CSS after child theme CSS?
- Why load_textdomain work but not load_plugin_textdomain?
- Override the core function locate_template
- How to override my plugin’s php classes with duplicates that are in my child theme folder
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- What is the way to ship read-me strings like plugin-strings for internationalization?
- unzip a folder on specific location and delete the zip file
- Can I use the same textdomain in two separate plugins?
- Making my plugin translation ready. Poedit not working
- Localiztion in javascript
- How to edit Image layout in single product page in woocommerce on wordpress?
- Possible to add a language file to a plugin without adding .po/.mo files to plugin directory?
- Why is the generated POT file from WordPress.org not adding my plugin description to the POT file?
- Reusable functions and tools (Framework)
- Loading child theme script after plugins scripts
- Override Javascript in a Plugin?
- Two text domains in one plugin
- Why does my functions.php cause white-screen and media-library issues?
- Use translated taxonomy labels in plugin
- Is it possible to use multiple post_name, post_title and post_content?
- How to overwrite core/libraries/vendor template with child theme
- Buddypress – Add the post_id in the bp_activity_add function
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- Removing an action from wp_footer called in a class that’s inside a bigger class
- Is there a way to test that readme looks in other language before submitting translation?
- Force language in translate function
- How to show only next post pagination link using wp_link_pages()
- Can I load the textdomain before a plugin is activated?
- Installing plugins and using complex folder structure with child theme in WordPress
- How WordPress is able to change locale without using setlocale
- How I can internationalize variables within the function _e () __ (), etc?
- Plugin for single language localisation [closed]
- Cart66 localization hardcode strings [closed]
- Overriding Parent Theme… will cause plugins failure?
- Localize plugin name
- How to over-ride a file in a plugin? [closed]
- WordPress override archive page template using a plugin
- Child Themes and Updating Parent Theme
- Translations for my plugin don’t show up
- Setting Email locale before retrieving gettext translations
- Managing wordpress Themes & plugins for multisite
- Translation issue with global variables
- How to ignore extra whitespaces in translation functions like _e?
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- How to customize this theme? [closed]
- Programmatically install and activate child-theme
- Plugin not properly prepared for localization
- Next Previous Post in wordpress with previous / next link with title?
- Replace woocommerce | (pipe) separator in product variation to , or another character?
- Trying to use shortcode for a plugin on custom homepage of Responsive theme
- Localise settings section headline
- Per theme plugins?
- How to translate user added content in a plugin
- How to override any plugin file in the child theme
- how to create a custom page in child theme or plugin?
- Use localized plugin name and description even when the plugin is disabled
- Hide custom field value
- I have updated my plugins, though one page of the site has ‘hit a critical error’
- Theme that includes a “core” plugin but the files in theme and child folder ignored
- Genesis Child Theme – Customize body
- Override plugin images so that they are not removed when the plugin is updated
- Plugin function in child theme
- Crazy redirect happening with no redirects set up
- I dont know why my localization is not working
- Google trying to index child theme files
- How can I write code in a plugin for my child theme that will allow me to use remove_action() based on if the current page is the home page?
- Cron job emails blank
- function of parent not working in childtheme
- Change localization only for plugin
- What Are the Advantages of Using an mu-plugin
- Locale changed but plugin still showing default language
- How to tell if a script is being executed from a plugin, a theme or a child theme in WordPress?
- Internationalization of Blog Posts
- How to Change MU/BuddyPress Group Blog New Installation Defaults [closed]
- How do I activate my child theme, as I do not see it in developer tools
- Can’t modify plugin function
- Scripts don’t enqueue after removing plugin
- Issue with customizer and widget page
- ACF prugin for WooCommerce Shop Page
- Any plugin installation and update overwrite current theme
- Admin Notice is only localized when displaying the “Plugins” Backend Page
- How Restrict access to admin dashboard by specific static ip?
- AJAX search posts and pages
- How to relate 3 wordpress components with each other (Create database relationships)
- I have a plugin that applies a Google translation to my page–how does the browser know which language to display?
- AI Code For OpenAI