Thanks for a great plugin.
Where question though – how can I translate the words Trash and Drafts that are in the posts menu?
The plugin follows WordPress standards for internationalization (or “i18n” for short). There is a
.potfile ready for translation in the
/languagesfolder of the plugin.
Unfortunately, I don’t have experience as a translator, so I can’t help you much beyond there. The Codex page I linked to in the last paragraph is a good place to start. If you do end up doing a full translation in another language, I’d be happy to include the translation file in future versions of the plugin!
Though is feels like overkill for just a few words, there are plugins that allow you to translate plugins in the WordPress interface such as WPML or CodeStyling Localization (the latter of which I’ve used to test the “translate-ability” of the plugin).
I should also mention that if you’re not actually looking to translate to another language but just to change the labels to other English words, the function uses the
get_post_stati()function to generate the list of statuses in the menu. That means if you can manage to filter the
$wp_post_statusesglobal, the plugin should use the result. You could also use the Edit Flow custom statuses feature to manage the statuses.
Hope this sends you down the right path!
Thank you for your quick and detailed reply. It helped in looking more at your plugin, and I saw that there’s a difference in the display of the post statuses:
In the writing options, there is a translation of the statuses (without me translating your plugin), as you can see here.
But in the Posts menu, there isn’t a translation, as you can see here. And this is where I want it to translate.
I see that the code that retrieves the statuses is different in each case. Could that be the reason? If so, what can I do?
I see what you’re saying now, sorry for being a little slow. It does look like there’s some underlying issue I need to fix.
I’ll try to take a look and report back soon if there’s a fix to be made.
I just wanted to give you an update on this issue.
I’ve confirmed that the menu items shouldn’t be translatable as they are currently setup. That’s certainly not what either of us want, but it gives me a direction for working out a solution and it means I can confirm with you that it’s nothing you’re doing causing the issue 🙂
I’m hoping to figure this out by week’s end and I’ll post here if/when I push an update that resolves the issue.
Thanks a lot for the update.
I’m looking forward to your solution 🙂
Good news: I have a few new possible paths forward.
Bad news: I haven’t had time to try them.
I’ve got some time optimistically blocked off for this next week, so I’m hoping to get to it sooner rather than later! Thanks for pinging me, though. A friendly nudge is always appreciated.
I’ve been able to fix the problem—at least in my tests—and pushed out version 1.1.3. Give it a try when you get a moment and let me know if it’s working for you.
- The topic ‘Translation of Drafts and Trash’ is closed to new replies.