Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Select language drop down

Status Resolved
Add-on / Version Publisher 1.0.4
Severity Critical
EE Version 2.6.0

Mark Coogan

Apr 08, 2014

Hi there, I wonder if you could help me out with what I’m trying to do.  I’m trying to set up a modal window which will have the publisher language switcher on it.  The user selects their language, clicks on go and they’re brought to the site with the chosen language selected.  I’ve set up form as below, but at the moment it just refreshes the page.  Is what I’m trying to do possible?

<form id=“countryForm” name=“countryForm”>
     

          {exp:publisher:languages}
          {long_name}
          {/exp:publisher:languages}

<input type=“checkbox” id=“checkbox1” name=“checkbox1” value=“yes”>       Check this box if you would like your choice to be remembered the next time you visit this website.

      <input class=“button” id=“countryBtn” type=“submit” name=“Submit” value=“Go”>
    </form>

#1

BoldMinded (Brian)

If its a modal not in an iframe then refreshing the page should be setting the language. If its in an iframe then you’ll need to implement your own javascript to redirect the parent window. Also, the checkbox isn’t necessary, Publisher saves the current language to a cookie and will use it when the user returns.

#2

Mark Coogan

Hi there, thanks for your help, I think I have the link working ok now. With regard to the checkbox, that was going to be part two of my question. The idea behind that is that if the person ticks that box, publisher will remember they’re language setting for 30 days. Is that something that can be done, can we tell publisher to save the language chosen for a set amount of time?

Thanks, Mark.

#3

BoldMinded (Brian)

I believe its already set for 1 month, but check the cookie timestamp and it will tell you how long it is set for.

#4

Mark Coogan

Hi again, thanks for your help. The cookie exp_publisher_site_language is set to expire after 7 days, is there anyway to increase that?

#5

BoldMinded (Brian)

I think it uses EE cookie settings, so look around in the CP for the native settings.

Login to reply