Can I translate the plugin without translating my WP admin?

WordPress Event Management, Calendars & Registration Forums General Question Can I translate the plugin without translating my WP admin?

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 10 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6762

    I followed the guide to translate the plugin. Unfortunately the procedure also translated my entire WP-admin. I just want to translate the words visivle to the visitor like “Ticket”, “Price” and “Book” without translating my WP-admin. Is it possible to do that?

    Jakov Perica
    #6774

    Hi Jakov,

    This isn’t plug-in specific (i.e. it’ll apply to the entire site!), but the following should work (but will probably only work in a plug-in not your theme’s functions.php:

    This keeps the locale as set in your wp-config.php for admin pages, and sets it to dutch on the front-end

    function jakov_set_locale_for_frontend( $locale ) {
       return is_admin()? $locale : 'nl_NL';
    }
    add_filter('locale', 'jakov_set_locale_for_frontend');
    

    If you want different languages for different users (e.g. logged-in admins) I’d recommend this plug-in: http://wordpress.org/plugins/wcm-user-language-switcher/

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.