Selecting a language in a php page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lynnspain
    New Member
    • May 2007
    • 3

    Selecting a language in a php page

    Hello would you please help me?

    I am still learning web design and would like to change the way a web site chooses the language for the user. At the moment I have an initial page where they select the language which then runs on all subsequent pages. I would like to skip that first page and have it so that when they click on the language flag or bullet the current page changes the language. Would any one have the script for this please.
    Here is a link to the site before any changes.

    my current web site

    thank you
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by lynnspain
    Hello would you please help me?

    I am still learning web design and would like to change the way a web site chooses the language for the user. At the moment I have an initial page where they select the language which then runs on all subsequent pages. I would like to skip that first page and have it so that when they click on the language flag or bullet the current page changes the language. Would any one have the script for this please.
    Here is a link to the site before any changes.

    my current web site

    thank you
    You will probably need Javascript for this task, I will move you to that forum.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by lynnspain
      Hello would you please help me?

      I am still learning web design and would like to change the way a web site chooses the language for the user. At the moment I have an initial page where they select the language which then runs on all subsequent pages. I would like to skip that first page and have it so that when they click on the language flag or bullet the current page changes the language. Would any one have the script for this please.
      Here is a link to the site before any changes.

      my current web site

      thank you
      For this, you will need ajax. See the AJAX tutorials in the Offsite Links sticky thread. Since you already have the php, it's just a case of making the request and changing items on the current page.

      Post your code if you get stuck.

      Comment

      • lynnspain
        New Member
        • May 2007
        • 3

        #4
        Originally posted by acoder
        For this, you will need ajax. See the AJAX tutorials in the Offsite Links sticky thread. Since you already have the php, it's just a case of making the request and changing items on the current page.

        Post your code if you get stuck.
        Hello thank you for your reply, I think I am now out of my depth.... Do I need a program for this or is it just a form of script. ( I am also not good a tech speak so I am sorry if I confuse you with the wrong choice of words.

        I apreciate your offer of help with the script but I honestly now do not knoe where to start.

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Originally posted by lynnspain
          Hello thank you for your reply, I think I am now out of my depth.... Do I need a program for this or is it just a form of script. ( I am also not good a tech speak so I am sorry if I confuse you with the wrong choice of words.

          I apreciate your offer of help with the script but I honestly now do not knoe where to start.
          Have you seen the tutorials on AJAX in the Offsite Links thread? The javascript makes a request to your php script. The PHP script returns a response which the javascript code should deal with, i.e. change the language. You may have to alter a few things, e.g. give the parts which contain the language text ids so that you can access them using javascript. In this way, the changes are made client-side without having to refresh the page.

          Comment

          Working...