Tagged: ,

Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #673320

    Hi,

    Polylang does not translate the text inside the copyrigth footer.
    How can I resolve this?

    #673631

    Hi Jan,

    Could you provide us with a link to the site in question so that we can take a closer look please? You can add your own copyright text by adding the following to the Copyright field:

    [nolink] Your content here
    

    Best regards,
    Rikard

    #673674

    Hi Rikard,

    Here is the admin login.
    Thanks!

    Best regards,
    Jan

    #674842

    Hi Rikard,

    Do you have already some information concerning this issue?

    Best regards,
    Jan

    #675140

    Hi,

    You could create a custom shortcode to handle the copyright content per language:

    function custom_shortcode_func() {
    	ob_start();
    	?>
    <div class="nav-previous alignleft">
    		<?php
    		$currentlang = get_bloginfo('language');
    		if($currentlang=="en-US") { ?>
    		This is English
    		<?php else if($currentlang=="de-DE") { ?>
    		This is German
    		<?php } else { ?>
    		This is Dutch
    		<?php } ?></div>
    <?php
    
    	$output = ob_get_clean();
        return $output;
    }
    add_shortcode('socket_info', 'custom_shortcode_func');

    Then you’d place [socket_info] as the copyright field value.

    Best regards,
    Josue

    #675656

    Hi Josue,

    When I test your code I get this error message:

    FATAL ERROR syntax error, unexpected ‘<‘ on line number 4

    Regards,
    Jan

    #675667

    Hi!

    It should have worked fine. You can go to wp-content/themes/enfold/functions.php file and remove the code and try using following one

    add_filter('kriesi_backlink','socket_per_language');
    function socket_per_language(){ 
    $currentlang = get_bloginfo('language');
    
    if($currentlang=="en-US") {
    $output = "your custom text in English";
    }
    elseif($currentlang=="de-DE") {
    $output = "your custom text in German";
    }
    return $output;
    }

    And remove your copyright text in Enfold theme options > Footer.

    Best regards,
    Yigit

    #675707

    Hi Yigit,

    Thank you for the code.
    Can I also use HTML links inside the custom text?

    Best regards,
    Jan

    #675708

    Hey!

    Yes, you can use HTML as following

    add_filter('kriesi_backlink','socket_per_language');
    function socket_per_language(){ 
    $currentlang = get_bloginfo('language');
    
    if($currentlang=="en-US") {
    $output = "your custom text in English";
    }
    elseif($currentlang=="de-DE") {
    $output = "<a href='http://kriesi.at' target='_blank'>your custom</a> text in German";
    }
    return $output;
    }

    Regards,
    Yigit

    #675786

    Hi Yigit,

    I also added the Dutch language but the footer is not working for this language.
    First I used the else statement for Dutch but I get a 500 error.
    With else if no error but it does not work.

    add_filter('kriesi_backlink','socket_per_language');
    function socket_per_language(){ 
    $currentlang = get_bloginfo('language');
    
    if($currentlang=="en-US") {
    $output = "your custom text in English";
    }
    elseif($currentlang=="de-DE") {
    $output = "your custom text in German";
    }
    elseif($currentlang=="nl-NL") {
    $output = "your custom text in Dutch";
    }
    return $output;
    }

    Best regards,
    Jan

    #676662

    Hi Yigit,

    As mentioned the Dutch copyright footer is not applied.
    Is the ELSEIF statement correct for Dutch in the function?

    I thought IF, ELSE IF, ELSE would work.
    But I get 500 error.

    Best regards,
    Jan

    #676682

    Hey!

    Please try following

    add_filter('kriesi_backlink','socket_per_language');
    function socket_per_language(){ 
    $currentlang = get_bloginfo('language');
    
    if($currentlang=="en-US") {
    $output = "your custom text in English";
    }
    elseif($currentlang=="de-DE") {
    $output = "your custom text in German";
    }
    else(){
    $output = "your custom text in Dutch";
    }
    return $output;
    }

    Best regards,
    Yigit

    #677243

    Hi Yigit,

    Strange, this does also not work for the Dutch footer version.
    Also 500 error!

    Best regards,
    Jan

    • This reply was modified 8 years, 2 months ago by jawes.
    #677370

    Hi,

    Try enabling debug mode and check if you get any error.

    Best regards,
    Josue

    #677466

    Hi Josue,

    This is the error:
    Parse error: syntax error, unexpected ‘)’ in /home/project1/domains/…./public_html/wp-content/themes/enfold-child/functions.php on line 50

    Cannot find a unexpected ) on this line.

    Best regards,
    Jan

    #677494

    Hi,

    Do you mind posting FTP and WP logins here privately so we can look into it?

    Best regards,
    Yigit

    #677538

    Hi Yigit,

    Here are the credentials you asked for.
    I removed your latest code, so you will have to apply it again for testing.
    Thank you for investigating the issue.

    Best regards,
    Jan

    #677546

    Hi!

    PHP opening tag was missing in functions.php file, i thought that was the issue and add the code with PHP opening tag but that still crashed the site. I am getting “Connection timed out or server hung up. The server you are connecting to may be configured to limit the number of connections you are allowed to make.” when i try to access to your server via FTP :/
    Sorry about that!

    Cheers!
    Yigit

    #677659

    Hi Yigit,

    Maybe I will have to whitelist your IP.

    Best regards,
    Jan

    #677895

    Or you can paste the full contents of your functions.php in a pastebin and we’ll inspect it.

    Best regards,
    Josue

    #678086

    Hi,

    I checked the functions.php and all non-related code is just removed!
    How about fixing this first.

    Best regards,
    Jan

    • This reply was modified 8 years, 2 months ago by jawes.
    #678089

    Check the pastebin for the code.

    Best regards,
    Jan

    #678303

    Hi,

    I shared confidential information, so I appreciate if this is handled carefully.
    Now I had to download a backup to get the code back in the file.
    Why is support not corresponding on this matter?

    Best regards,
    Jan

    #678355

    Hi,

    Here’s the error:

    else () {
    

    Should be:

    else {
    

    Best regards,
    Josue

    #678661

    Hi Josue,

    It is working, thank you for resolving.

    Best regards,
    Jan

    #678693

    You are welcome Jan, glad to help :)

    Regards,
    Josue

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘Polylang copyright footer’ is closed to new replies.