This topic has 4 replies, 3 voices, and was last updated 7 years by ryank.

  • Author
  • #179425
     ryank
    Participant

    Hello I would like to change, change the description phrases of the membership (with the cross ☑ blue on the side) how can I do to change the sentence please it is urgent

     

    Attachments:
    You must be logged in to view attached files.
    #179527
     Kieran_SQ
    Moderator

    Hi,

    Thanks for reaching out to us about translations, you can use a plugin called LocoTranslate to translate your site into any language.

    Once you have installed the plugin and reviewed their documentation on how to use it, you should translate SweetDate and Paid Memberships Pro.

    If you want to only change a few strings you can use the below snippet in your child theme’s functions.php

    COPY CODE
    function change_translate_text_multiple( $translated ) {
    	$text = array(
    		'Old Text 1' => 'New Translation 1',
    		'Old Text 2' => 'New Translation 2',
    		'Old Text 3' => 'New Translation 3',
    	);
    	$translated = str_ireplace(  array_keys($text),  $text,  $translated );
    	return $translated;
    }
    add_filter( 'gettext', 'change_translate_text_multiple', 20 );

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #179804
     ryank
    Participant

    Bonjour dans le plugin loco translate
    je ne retrouve pas ces phrases ‘View members’ etc
    ensuite j’ai fait comme vous m’avez dit /sweetdate_child/functions.php

    COPY CODE
     function change_translate_text_multiple( $translated ) {
    	$text = array(
    		'View members directory' => 'Voir les membres',
    		'Old Text 2' => 'New Translation 2',
    		'Old Text 3' => 'New Translation 3',
    	);
    	$translated = str_ireplace(  array_keys($text),  $text,  $translated );
    	return $translated;
    }
    add_filter( 'gettext', 'change_translate_text_multiple', 20 );
    ?>

    et rien n’a changé
    Merci
    https://meet-with-love.fr/compte-dadherent/niveaux-abonnement/

    Attachments:
    You must be logged in to view attached files.
    #179921
     Radu
    Moderator

    Hi,

    Just add the next snippet to sweetdate_child/functions.php

    And replace with your text.

    COPY CODE
    
    
    
    function translate_memberships_options($kleo_pay_settings)
    {
        $kleo_pay_settings = array(
            array(
                'title' => __('Restrict members directory1', 'kleo_framework'),
                'front' => __('View members directory1', 'kleo_framework'),
                'name' => 'members_dir'
            ),
            array(
                'title' => __('Restrict viewing other profiles2', 'kleo_framework'),
                'front' => __('View members profile2', 'kleo_framework'),
                'name' => 'view_profiles'
            ),
            array(
                'title' => __('Restrict access to groups directory3', 'kleo_framework'),
                'front' => __('Access group directory3', 'kleo_framework'),
                'name' => 'groups_dir'
            ),
            array(
                'title' => __('Restrict access to single group page4', 'kleo_framework'),
                'front' => __('Access to groups4', 'kleo_framework'),
                'name' => 'view_groups'
            ),
            array(
                'title' => __('Restrict users from viewing site activity', 'kleo_framework'),
                'front' => __('View site activity', 'kleo_framework'),
                'name' => 'show_activity'
            ),
            array(
                'title' => __('Restrict users from sending private messages', 'kleo_framework'),
                'front' => __('Send Private messages', 'kleo_framework'),
                'name' => 'pm'
            ),
            array(
                'title' => __('Restrict users from adding media to their profile using rtMedia or bpAlbum', 'kleo_framework'),
                'front' => __('Add media to your profile', 'kleo_framework'),
                'name' => 'add_media'
            )
        );
    
        return $kleo_pay_settings;
    
    }
    add_filter( 'kleo_pmpro_level_restrictions', 'translate_memberships_options', '10',1);
    
    

    If copying the code from above causes fatal error paste it from here : https://pastebin.com/raw/S4wm1nP3

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #179945
     ryank
    Participant

    Nice Great
    Thanks for your time
    ça marche
    That good

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?