Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    Posts
    6
    Plugin Contributions
    0

    Default Language.php automatic language adjustments

    In includes/classes/language.php is the following function:
    Code:
        function get_browser_language() {
          $this->browser_languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
    
          for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
            reset($this->languages);
            while (list($key, $value) = each($this->languages)) {
              if (eregi('^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {
                $this->language = $this->catalog_languages[$key];
                break 2;
              }
    It seems to me there is a check for the languages that are suported by the browser of the visitor. But it does not function as supposed?

    I am using Zen Cart 1.2.6 and because i made some deepgoing adjustments to Zencart i can not easily update my Zencart.

    Our website is for the Dutch and Belgium market, as the Belgium market is devided in a Vlemisch (Belgium Dutch) and a French language part I want to check which language the visitor is using with his browser. When he is using the French language he will see our French site and when he is Vlemisch/Vlaams he will see the Dutch-Belgium language.

    Is there anyone who knows how to do this or to make the above function work?

  2. #2
    Join Date
    Aug 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Language.php automatic language adjustments

    duh! i spend 4 hours searching this site for my answer and after i posted this message the board brought up http://www.zen-cart.com/forum/showth...7&page=1&pp=10 as a similair message. This explains all i wanted.

    Thread can be closed.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 13 Jan 2015, 11:11 PM
  2. GeoIP for automatic language and currency change?
    By lexus_ in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 23 Nov 2011, 11:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR