• Resolved ktru2017

    (@ktru2017)


    Hello there,
    I’m having issues with my home page reverting back to the default language.

    For example, I can translate the home page when the site loads, then navigate to internal pages, but when I go back to the home page it reverts back to English but still has the /ko slug after the URL.

    I did follow this forum’s ticket to fix a #TRPLINKPROCESSED issue but I’m wondering if it’s now causing this latest bug.

    Here’s what I have in the plugin PHP file for reference.

    // Start writing code after this line!

    
    add_filter( ‘trp_force_custom_links’, ‘trpc_ignore_url’, 10, 4 );
    function trpc_ignore_url( $translated_url, $url, $language, $a_href ){
    $link_to_ignore = 'https://www.ahskorea.com/'; // url to ignore.
    if ( strpos( $url, $link_to_ignore) !== false ){
    return $url;
    }
    return $translated_url;
    }
    
    • This topic was modified 2 years, 4 months ago by ktru2017.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for reaching us!

    I see that in you code you added the www before the domain name yet, when accesing your website, it is not structured this way.
    Futhermore, I see that you redirect the trafic from the https://www.ahskorea.com to https://ahskorea.com/

    As shown here:
    https://ibb.co/vxfkHcS
    https://ibb.co/mz6PsSN

    Please use this code instead:

    add_filter( ‘trp_force_custom_links’, ‘trpc_ignore_url’, 10, 4 );
    function trpc_ignore_url( $translated_url, $url, $language, $a_href ){
    $link_to_ignore = 'https://ahskorea.com/'; // url to ignore.
    if ( strpos( $url, $link_to_ignore) !== false ){
    return $url;
    }
    return $translated_url;
    }

    And let me know if the issue is still present even after this small correction.

    Cheers,

    • This reply was modified 2 years, 4 months ago by Denis.
    • This reply was modified 2 years, 4 months ago by Denis.
    Thread Starter ktru2017

    (@ktru2017)

    Hi,
    Thank you so much for the fresh set of eyes. I updated the URL, however now the rest of the pages seem to be having issues. ie. not translating at all. I should also note, that this seems to only happen on mobile phones. Desktop works great.

    Thread Starter ktru2017

    (@ktru2017)

    Hello again,

    I’m still working on troubleshooting this issue. I’ve provided some links to video of what we’re experiencing on desktop (Brave browser) and mobile (Safari) hopefully this will be helpful in pin pointing the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Home page reverts to default language’ is closed to new replies.