Localisation
-
Dear David,
What a useful plugin, thank you so much for this!
I’m wondering whether you’re planning to add translation support. That would be great for all non-english websites and I would love to translate it to German.Best regards,
Philipp
-
Yes, soon.
Done adding support for localization – I hope. Let me know if there is anything I can do to help with your translation.
David, thank you so much!
I copied the file and /language folder to mu-plugins (installation instruction).
But the translation I did doesn’t work. Maybe you should useload_muplugin_textdomaininstead ofload_plugin_textdomain.
Tried that but without success…BTW is it possible to deactivate single privacy options. E.g. if I just want to use “Visible only to registered users of this network” and nothing else… ? ๐
Thank you so much, again!
Philipp
I forgot to hook the text domain action to the admin_init action. That’s done now – pull down revision 3.8.1.1. I should have checked that before synching the 3.8.1 revision.
(Installation instructions updated too)
“to deactivate single privacy options”
You’ll need to fork the plugin and hack away. I use all options in my installs so removing any is not an option for me.
Edit these labels and blog admins will only see the options you want:
<label class="checkbox" for="blog-private-1"> <input id="blog-private-1" type="radio" name="blog_public" value="-1" <?php checked('-1', get_option('blog_public')); ?> /><?php _e('Visible only to registered users of this network', $this->l10n_prefix); ?></label> <br/> <label class="checkbox" for="blog-private-2"> <input id="blog-private-2" type="radio" name="blog_public" value="-2" <?php checked('-2', get_option('blog_public')); ?> /><?php _e('Visible only to registered users of this site', $this->l10n_prefix); ?></label> <br/> <label class="checkbox" for="blog-private-3"> <input id="blog-private-3" type="radio" name="blog_public" value="-3" <?php checked('-3', get_option('blog_public')); ?> /><?php _e('Visible only to administrators of this site', $this->l10n_prefix); ?> </label>becomes…
<label class="checkbox" for="blog-private-1"> <input id="blog-private-1" type="radio" name="blog_public" value="-1" <?php checked('-1', get_option('blog_public')); ?> /><?php _e('Visible only to registered users of this network', $this->l10n_prefix); ?></label>Great!
Thank you so much for this! ๐Hi David,
it now works as great. There just seems to be a last translation bug with the notes for the login forms. E.g. this doesn’t use the translation:
function registered_users_login_message () { global $current_site; echo '<p>'; echo __('Visible only to registered users of this network', $this->l10n_prefix); echo '</p><br/>'; }I would like to send my german translation, if you’re interested in.
Best regards,
Philipp
Thanks for the feedback, Phillip.
I hooked the load_plugin_textdomain to the “admin_init”, but it should be hooked to the “init”.
Anyway, an update of the plugin has been pushed up to the repository. No changes to the poedit file on my end, so your translation has a better chance of kicking in on the login form and the admin areas.
While your at it, a caution: updating the plugin (like many with their own “languages” directory within the plugin directory) may delete your “po” and “mo” files.
I often delete my “po” files while testing and re-uploading a backup – quite often.
Stick your poedits in your WP_LANG_DIR: “/wp-content/languages/plugins/”
Thank you very much, David!
That’s it. ๐ Just copied the translation files to “/wp-content/languages/plugins/” and updated the plugin… Perfekt!Thanks,
Philipp
The topic ‘Localisation’ is closed to new replies.