• Resolved donki

    (@donki)


    Hello,

    I have splash on my site and it works only with default language. I have setup hide information about language in URL for default language. So for other language for example German it goes automatically to “https://mydomain.com/de” what is not generate the splash site. How I can solve that problem? I use simplesplash plugin.

    I think I need some modification in simplesplash PHP code, but I don’t know PHP:

    if( (strpos($_SERVER['HTTP_REFERER'], get_bloginfo('home')) === false) &&
    		        get_bloginfo('wpurl').'/' == 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])
    		add_action('send_headers', array('simplesplash', 'display_splash'));

    https://www.ads-software.com/plugins/qtranslate-x/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Clause

    (@johnclause)

    Under which multilingual plugin did it work fine before, if any? Could you please give step-by-step instructions how to reproduce the problem, preferably under a standard theme like Twenty Fifteen, and the minimum set of plugins?

    Thread Starter donki

    (@donki)

    I use multilingual plugin first time.

    1. Installed simplesplash plugin.
    2. Create splash site. Splash works on mydomain.com
    3. Installed qtranslated X. After I install it I still got address for home site mydomain.com for default language and splash works. After someone change the language to German it stored that on memory and redirect always to mydomain.com/de. If someone close the browser and next day go to maindomain.com it redirect him directly to mydomain.com/de (because he selected before that language) and splash doesn’t show.

    I made some modification on simplesplash PHP code and now it works after refresh any site by broweser button. But I wonder how to made that only on mydomain.com and mydomain.com/de

    function simplesplash() {
    		// Check the relation between the referer and WordPress-Home-Url.
    		// Also the requested URL should be the WordPress-Startpage.
    
    		if( (strpos($_SERVER['HTTP_REFERER'], get_bloginfo('home')) === false) &&
    		        get_bloginfo('wpurl').'/' == 'https://mydomain.com/')
    		add_action('send_headers', array('simplesplash', 'display_splash'));
    	}

    I think it will be easy duplicate that code for both sites, but I am not PHP programmer just analyze it like in other programming language.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Splash works only on default language’ is closed to new replies.