Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

LANGUAGE AUTOMATIC SELECTION


lojze

Recommended Posts

// language

  if ( (!$language) || ($HTTP_GET_VARS['language']) ) {

    if (!$language) {

      tep_session_register('language');

      tep_session_register('languages_id');

    }

 

    $language_code = ($HTTP_GET_VARS['language']) ? $HTTP_GET_VARS['language'] : substr(getenv('HTTP_ACCEPT_LANGUAGE'),0,2);

    $lang_temp = tep_get_languages($language_code);

    $languages = ($lang_temp) ? $lang_temp : tep_get_languages(DEFAULT_LANGUAGE);

    $language = $languages[0]['directory'];

    $languages_id = $languages[0]['id'];

  }

------code end----------

 

When I put this code to the application_top.php instead of //set language... it returned that tep_get_languages is not defined. Have somebody suggestion?

Link to comment
Share on other sites

  • 2 weeks later...

Is there any way to change the theme per category? I've been using STS, But much perfer BTS, however STS allows me to theme per category and per script i.e product_new.php or checkout_success.php

 

THanks and great contribution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...