Hi Paul, good point: what to do with outdate translations?
I’ve been looking into this a bit and may have found a solution:
- Initialize localizations using the
load_plugin_textdomain
function ()
- For each version of the plugin where you make changes to text strings, update the domain, i.e. achievements-3-1-4_de-DE.
I believe this will only load updated translation files belonging to the correct domain. Although I’m not sure if this means you need to update your code everywhere there is a string with the new domain?
I guess that leaves the manual option: accept translation files, bearing in mind that the non-translated strings will just show as english, and send out a call to the translators to send in updated language files. But that could get into a management nightmare.
I guess short of that, you could maybe host contributed language files on your web site for people to download and update as need, then include the ones that are up-to-date.
Or you could just specify a localization directory in the plugin, then allow users to add their own translations to their child-theme, but I think a hosted option would be a step better, as it would keep you in the loop, and give your users a starting point to update localizations as needed.
This is a toughie. ??
~Mike