How do I make a pop-up warning page matched to the language of the country?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Darrell
    Confirmed User
    • Feb 2003
    • 803

    #1

    How do I make a pop-up warning page matched to the language of the country?

    I've searched everywhere on how to do this with no success and am hoping someone here will be able to help me

    I want a pop-up warning page to appear when someone enters a site matched to the language of their country. Any ideas how I do that?
  • v4 media
    Confirmed User
    • Feb 2005
    • 2934

    #2
    would it not be easier to do it matched to the browser lang?

    Comment

    • Darrell
      Confirmed User
      • Feb 2003
      • 803

      #3
      Originally posted by v4 media
      would it not be easier to do it matched to the browser lang?
      I hadn't thought of that Can you give me any help on where I can find out how to do that?

      Comment

      • v4 media
        Confirmed User
        • Feb 2005
        • 2934

        #4
        Originally posted by Darrell
        I hadn't thought of that Can you give me any help on where I can find out how to do that?
        Sorry not a programmer, but I don't think it's difficult, can probably be done with htaccess

        Comment

        • grumpy
          Too lazy to set a custom title
          • Jan 2002
          • 9870

          #5
          Code:
          <SCRIPT LANGUAGE="JavaScript">
          <!-- Begin
          if (navigator.appName == 'Netscape')
          var language = navigator.language;
          else
          var language = navigator.browserLanguage;
          if (language.indexOf('en') > -1) document.location.href = 'english.html';
          else if (language.indexOf('de') > -1) document.location.href = 'german.html';
          else if (language.indexOf('it') > -1) document.location.href = 'italian.html';
          else
          document.location.href = 'defaultpage.html';
          // End -->
          </script>

          some java for you
          Don't let greediness blur your vision | You gotta let some shit slide
          icq - 441-456-888

          Comment

          • Darrell
            Confirmed User
            • Feb 2003
            • 803

            #6
            Originally posted by grumpy
            Code:
            <SCRIPT LANGUAGE="JavaScript">
            <!-- Begin
            if (navigator.appName == 'Netscape')
            var language = navigator.language;
            else
            var language = navigator.browserLanguage;
            if (language.indexOf('en') > -1) document.location.href = 'english.html';
            else if (language.indexOf('de') > -1) document.location.href = 'german.html';
            else if (language.indexOf('it') > -1) document.location.href = 'italian.html';
            else
            document.location.href = 'defaultpage.html';
            // End -->
            </script>

            some java for you
            Thanks I'll try that out

            Comment

            • Iron Fist
              Too lazy to set a custom title
              • Dec 2006
              • 23400

              #7
              Nice code
              i like waffles

              Comment

              • AIbenjamink
                Confirmed User
                • Jan 2009
                • 420

                #8
                You would probably want to use a server side language in case your visitor has javascript disabled.
                Benjamin : [email protected] : 405-243-447 : www.AdultInterface.com

                Comment

                • Darrell
                  Confirmed User
                  • Feb 2003
                  • 803

                  #9
                  Originally posted by AIbenjamink
                  You would probably want to use a server side language in case your visitor has javascript disabled.
                  Good idea. Thanks.

                  Comment

                  Working...