Plugin Author
Tim W
(@timwhitlock)
I’m guessing the plugin doesn’t declare that its text domain is wp_courseware (with an underscore). Loco has guessed wp-courseware (with a hyphen) as it has no way of knowing without the plugin declaring it.
Hi Tim,
thank you for your support 🙂
Since Codestyle Localization appears to be unsupported and depreciated you and WPML become the go-to guys. My project here is a single-language website and thus WPML is overkill.
Loco Translate reads the WP Courseware plugin and finds 1020 strings to translate.
(The WP Courseware default.po only contains 1013 strings…)
The strings can be translated with Loco Translate and Loco Translate save them to the global language directory as recommended: /wp-content/languages/plugins/wp-courseware-da_DK.mo. The filename is generated by Loco Translate.
The problem is the translations does not kick in on the front end.
Shouldn’t WordPress recognize the language file in the global language directory?
Or does this have something to do with the way localization has been done in the WP Courseware plugin?
Should i take this up with the developers of WP Courseware?
Please advice where to go from here?
Plugin Author
Tim W
(@timwhitlock)
I explained why WordPress doesn’t recognise the language file — It’s looking for wp_courseware and the file is saved as wp-courseware. Note the difference between a hyphen "-" and an underscore "_".
There is an official way for a plugin to declare its Text Domain to WordPress. Loco might guess wrongly if its not declared, and it sounds like that’s exactly what’s happened. There’s nothing you can do about this other than rename the files and ask the authors politely to declare the text domain in their next update.
So, I suggest you manually rename the files to get it working. Then tell the authors that the way the plugin is set up is making it difficult to use the translation software you have chosen. They’re under no obligation to ensure compatibility with my plugin, but you never know, they might want to. Send them to this thread if you don’t know what to say.
Hi Tim,
Thank you for pointing this out; when wp-courseware-da_DK.mo is renamed to wp_courseware-da_DK.mo the translations kick in.
It is a temporary solution though. When the translation is updated Loco Translate saves a new file named wp-courseware-da_DK.mo and WP Courseware doesn’t recognize that.
I will pass this along to the authors of WP Courseware as you suggest.
Thank you for your support.
Hi guys,
I’m new to wp but I’m sure you can help me.
I intalled wp-courseware and I want to translate it to Brazilian Portuguese, I installed the Loco Translator but after chosing the wp-courseware plugin, and “brazilian portuguese” language, it shows “0%” translated, there are 1013 terms found. What should I do? How to work with these translation files? How to create a folder in WP?
Please help!
Thanks.