Take this course depend on Language

Home Forums Legacy Support Support queries Translation issues Take this course depend on Language

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #44812
    ateya3d
    Spectator
    Hello i want the Button link of  take this course http://arch-school.com/register/ changed depend on the user language selected if the user select our website language to be Arabic the link will be http://arch-school.com/ar/register/ if the user select our website language to be French the link will be http://arch-school.com/fr/register/   not all language  to  <span style="line-height: 1.5;">http://arch-school.com/register/</span>  
    #45000
    ateya3d
    Spectator
    any replay ???
    #45164
    ateya3d
    Spectator
    3 days without replay
    #45289
    ateya3d
    Spectator
    why no any replay ???????????????????????????????????
    #45316
    MrVibe
    Keymaster
    This issue is not connected to the theme at all. The registration page is provided by buddypress and the languages are provided by your multi lingual plugin. Please consult your multilingual plugin support for this.
    #45318
    MrVibe
    Keymaster
    We can not help you on this even if we want to as the code which is responsible for this is run by your multi lingual plugin and BuddyPress.
    #45392
    ateya3d
    Spectator
    hello this is the WPLM Support replay   Hello, I understand this but WPML has no control over your buttons link, you would use WPML to translate the text of the button link "TAKE THIS COURSE" now if you want the button link to point to a different link in every language WPML has no control over this IF you want to transalte the string "TAKE THIS COURSE" then i can further help you, but if your issue is with the link WPML has no control over this
    #45411
    MrVibe
    Keymaster
    please share more details like how are you changing the button link ? Is it a customisation ? If then then you will need to use the wpml function icl_object_id to get the language register link. Again I am not sure why wpml does not suggest you their functions for this. if he customisation has been provided by us then I can tell where you need to insert the code exactly.
    #45412
    MrVibe
    Keymaster
    Also a suggestion do not post reply asking us to reply as we pick the oldest topics first, posting a reply renews a topics date and it goes lower in the order and your topic is unnecessary delayed.
    #45413
    ateya3d
    Spectator
    Hello when any visitor to our website want to take any course he press on Take This Course button as illustrated in attached image and the link go to  http://arch-school.com/register/   when any visitor to our website select the website main language is Arabic and want to take any course must be the link go to http://arch-school.com/ar/register/ but the link go to the http://arch-school.com/register/
    #45696
    Anshuman Sahu
    Keymaster
    Okay please confirm if you have applied any tip to apply the resister link on take this course page . If yes then please share link . Here is the code to fix the "Sign up" link in top menu . add_filter('wplms_buddypress_registration_link','run_wpml_register_link'); function run_wpml_register_link($link){   $pages_array=get_option('bp-pages');   $id=$pages_array['register'];   if(function_exists('icl_object_id'))       $id = icl_object_id($id, 'page', true);     return get_permalink($id);   }
    #45703
    ateya3d
    Spectator
    :( i think our problem from this custom code :( /** *Redirect Non-logged in Users to Register Page when they click on Take this course button */ add_filter('wplms_take_course_button_html','custom_non_loggedin_user_redirect',10,2); function custom_non_loggedin_user_redirect($html,$course_id){ if(!is_user_logged_in()){ $extra =''; $register_page='/register'; return ''.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).''; } return $html; }` `
    #45962
    ateya3d
    Spectator
    Waiting Replay Please
    #46051
    MrVibe
    Keymaster
    The above code is not good, as soon as you change your registration page slug it will stop working. Also it seems it is not being used. Please consult the developer of the code for further details. The code shared by Alex is correct, however it seems your question itself misses the information. Where exactly you want the link to be changed. Can you please share a screenshot of the same. ps : Again, we're using icl_object_id function which is a function provided by WPML, so a better answer would be provided by WPML.  
    #46052
    ateya3d
    Spectator
    This code form your forums tricks and when i ask WPML Support to modify it he till me this code must be edited by the theme support you tell me ask WPLM WPLM tell me ask you
Viewing 15 posts - 1 through 15 (of 25 total)
  • The topic ‘Take this course depend on Language’ is closed to new replies.