Automatic translation of pages that recognise IP locations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Clean_Franck
    So Fucking Banned
    • Jan 2007
    • 399

    #1

    Automatic translation of pages that recognise IP locations

    I am throwing this out there, but is there such a service that translates your web pages automatically for you when a surfer logs on from a different country?

    For example the type of thing google has, it recognizes where the user is from throws them to the french site http://www.google.fr and the google page is in French.

    Can this type of thing be done or does everything have to be translated manually?
  • mpahlca
    Confirmed User
    • Feb 2004
    • 1821

    #2
    not sure of a service, but you could do it in php with smarty and lang files using that it would auto transalte on whatever variable you so desired.
    I could give two shits wether you read this sig or not.

    Comment

    • acctman
      Confirmed User
      • Oct 2003
      • 2840

      #3
      but what if an english reading person is traveling overseas or military person is viewing the page outside of the of the country he's from.

      i guess it would work for majority of the viewers.

      Comment

      • borked
        Totally Borked
        • Feb 2005
        • 6284

        #4
        IMO you should never present language-localised pages based on IP address, but based on the browser language settings. I'm in France, but I prefer to read English, so I set my browsers to default to En-en.

        Web pages should respect my choice and not diss up French pages based on my IP address location.

        For coding work - hit me up on andy // borkedcoder // com
        (consider figuring out the email as test #1)



        All models are wrong, but some are useful. George E.P. Box. p202

        Comment

        • Pete-KT
          Workin With The Devil
          • Oct 2004
          • 51532

          #5
          you should never translate by ip, you should translate based on the surfers language setting in there browser

          Comment

          • Clean_Franck
            So Fucking Banned
            • Jan 2007
            • 399

            #6
            Thanks for the advice regarding browser settings. To clarify however, this can be done automatically and I don't need to go through my pages with a translator having to do each and everyone of them popping them on a new page?

            Are there any pages on how to set this up? I would not really know what to look for.

            Comment

            • Clean_Franck
              So Fucking Banned
              • Jan 2007
              • 399

              #7
              If someone could quickly help out old franck

              Comment

              • SmokeyTheBear
                ►SouthOfHeaven
                • Jun 2004
                • 28609

                #8
                What i would do is log your visitors languages and get an idea of the top languages , then work on getting some "real" translations for the major ones

                make a file called languagelog.txt upload to root , chmod then drop this pgp into your index, this will log the different languages.
                Code:
                <?php
                $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
                $fh2 = fopen("languagelog.txt", 'a+');
                fwrite($fh2, "$lang\n");
                fclose($fh2);
                ?>
                it all depends on the type of site you have in how you would implement translation integration.

                Could be as simple as a welcome message
                if ($lang == "en"){ $welcomemessage = "Welcome to my site";}
                if ($lang == "fr"){ $welcomemessage = "Bonjour tete a la merde";}
                hatisblack at yahoo.com

                Comment

                • SmokeyTheBear
                  ►SouthOfHeaven
                  • Jun 2004
                  • 28609

                  #9
                  another idea is just to redirect certain languages to an online translator like babelfish that translates the page you're on
                  Code:
                  <?php
                  $mypage = "www.gfy.com/index.php";
                  $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
                  if ($lang == "de"){
                  $url = "http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2F$mypage&lp=en_$lang&btnTrUrl=Translate";
                  header("Location: $url");
                  exit;
                  }
                  
                  ?>
                  Last edited by SmokeyTheBear; 08-16-2009, 09:40 AM.
                  hatisblack at yahoo.com

                  Comment

                  • SmokeyTheBear
                    ►SouthOfHeaven
                    • Jun 2004
                    • 28609

                    #10
                    what i would do is simply translate the words "translate this page" then put a link near the top that leads to an online translation service like babelfish.
                    hatisblack at yahoo.com

                    Comment

                    • SmokeyTheBear
                      ►SouthOfHeaven
                      • Jun 2004
                      • 28609

                      #11
                      something like this
                      Code:
                      <?php
                      $mypage = "www.gfy.com/index.php";
                      $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
                      $url = "http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2F$mypage&lp=en_$lang&btnTrUrl=Translate";
                      if ($lang == "fr"){
                      $message = "Translate this page <- this should be in french";
                      }
                      if ($lang == "de"){
                      $message = "Translate this page <- this should be in german";
                      }
                      $translatelink = "<a href=\"$url\">$message</a>";
                      echo $translatelink;
                      
                      ?>
                      hatisblack at yahoo.com

                      Comment

                      • fris
                        Too lazy to set a custom title
                        • Aug 2002
                        • 55679

                        #12
                        I have this method setup in wordpress
                        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                        Comment

                        • Clean_Franck
                          So Fucking Banned
                          • Jan 2007
                          • 399

                          #13
                          Thankyou Smokey for your help.
                          I like the idea of real translations for visitors from the major countries who visit me site.

                          For the other countries though, what method would be best for my translated pages to appear based on their browser settings automatically and a page of mine created for that langauge.

                          E.g. the page is mysite.com/porn.html
                          And someone from Poland logs on with polish settings in his browser. I would then want a page created for him in polish that is under the url mysite.com/porn.html&pl

                          I am not sure whether that is the second or third method you posted and whether the online services allow this.

                          Comment

                          • GT-Omar
                            DM at Performive.com
                            • Aug 2006
                            • 2968

                            #14
                            Smokey hits nail on head!

                            Hey Smokey. When ever you have a chance can you hit me up. Would like to discuss a few things with with regards to this. See sig.

                            Clean Frank. If you're looking to translate into different languages let me know. We would be more than happy to help.


                            Email me

                            Skype me

                            Comment

                            • Clean_Franck
                              So Fucking Banned
                              • Jan 2007
                              • 399

                              #15
                              Hey for the moment I would like to just get automatic setup. Once I have some spare cash then I can go down the proper route. But just need to know how to go about it.

                              Comment

                              Working...