Welcome, Guest
Username: Password: Remember me

TOPIC: Switching Languages fails

Switching Languages fails 3 years 4 months ago #59184

  • dleger
  • dleger's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Hello,

MY survey has 2 languages. French and English. When switching from one language to another, it tried to open the link to the other version, however, the domain name is not present so it fails.

So it goes from

www.surveydomain.com/index.phpXXXXXXXXX

to

index.phpXXXXXXXX

ps: i dunnop why, but the h ttp:// won't show above when I post... But it is there in the url bar during the survey.

I tried searching but could not find any other postings that were similar.

Thanks in Advance for your help.
Last Edit: 3 years 4 months ago by dleger.
The administrator has disabled public write access.

Re: Switching Languages fails 3 years 4 months ago #59239

  • dleger
  • dleger's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
This is a sample of what I mean...

equusfeedback.ca//index.php?sid=66963&newtest=Y&lang=en

After hitting "Next"... If you try to switch the language, the domain name gets lost.


I can run the URL for the french survey no problem if I use the direct link.
Last Edit: 3 years 4 months ago by dleger.
The administrator has disabled public write access.

Re: Switching Languages fails 3 years 4 months ago #59241

  • dleger
  • dleger's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
QUick update...

I looked at the code from the actual running survey, and noticed this

<select name="select" class='languagechanger' onchange="javascript:window.location=this.value">
<option value="//index.php?sid=66963&lang=en">English</option>
<option value="//index.php?sid=66963&lang=fr" >French</option>
</select>

Under option value, the URL is not showing... I see a reference to calss languagechanger... Which I assume refers to the language.php file. I'm not a programmer, but can handle some basics... But I can't find where it might cause the root url to be missing.
The administrator has disabled public write access.

Re: Switching Languages fails 3 years 4 months ago #59242

  • dleger
  • dleger's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
OK.. I found a workaround...

IN the index.php file, there is a section to "Create" the languageswitcher...

There is a variable that is supposed to put the url..$relativeurl

I replaced it with the actual URL and it works.

Obviously not the ideal, but it will work for now until I figure out how to ensure $relativeurl is properly set. I haven't found where the variable is set yet.
The administrator has disabled public write access.

Re: Switching Languages fails 3 years 4 months ago #59267

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6277
  • Thank you received: 802
  • Karma: 241
Hello,

Maybe your rooturl in config.php are false ?
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.112 seconds
Donation Image