Plugin Author
Tim W
(@timwhitlock)
Good question. This is one of my biggest problems.
There is no reliable way to do this right now. Text domain detection gets into a muddle in this situation, and child themes actually make that muddle worse.
Improving text domain detection (and manual configuration) is top of my list of improvements along with support for multiple domains. Changing the algorithms now will break functionality for other users, so this will go into a version 2 later this year.
I may add some filter hooks as a short term solution though. Would that be something you could work with?
Hi. I think it would be a nice solution adding some filter hooks. Thank you!
Exactly same problem here. Naming the translation files using the text domain allows them to be used by WordPress (website properly translated), but then they are not shown by loco translate. Naming the translation files using the theme names allows them to be shown by loco translate, but not to be used by WordPress (website not translated). What is the current recommended workaround?
I had a similar problem with a third party plugin (translations loaded by WP but not shown by Loco translate), and was able to fix it temporarily by adding the “Text domain” property inthe header (though it will break upon update of the plugin). I am looking for something similar to apply to a theme’s file.
I tried editing the header of style.css as recommended here, but it does not help (text domaine is supposed to be “vibe”):
/*
Theme Name: WPLMS
Theme URI: http://www.VibeThemes.com/
Description: WPLMS is a Learning Management System for WordPress. The theme is deep integrated with BuddyPress and comes packed with the Course Module plugin. Theme has very powerful features which are essential for a full fledges LMS. Theme utilizes maximum of both WordPress and BuddyPress and can be run on a large scale platform as well.
Author: Mr.Vibe
Author URI: http://www.VibeThemes.com/
Text Domain: vibe
Domain Path: /languages
Version: 1.9.8
License: Themeforest
License URI: http://themeforest.net/licenses
*/
Update: This workaround works. You have to be very careful with EOL characters when editing the header! I had replaced them all with “\r” and it was no longer parsing it correctly (and due to Locotranslate’s caching system, I could not see it).