Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2012
    Posts
    52
    Plugin Contributions
    0

    help question How to get current language id

    i want to show the current language id in main page,
    for example, if switch to language english, show the id "1",

    i tried this, but it doesn't work
    <?php echo $current_language_id; ?>

    any idea?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How to get current language id

    $_SESSION['language'] will give 'english'
    $_SESSION['languages_id'] will give '1'
    $_SESSION['languages_code'] will give 'en'
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2012
    Posts
    52
    Plugin Contributions
    0

    Default Re: How to get current language id

    thank you

 

 

Similar Threads

  1. v150 if the language pack is older than current zc version
    By jaca in forum Addon Language Packs
    Replies: 2
    Last Post: 27 Mar 2012, 12:00 AM
  2. how to get the value of current category with PHP code?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 16 Feb 2011, 05:27 PM
  3. Get current cpath
    By foteek in forum General Questions
    Replies: 2
    Last Post: 31 Aug 2008, 03:59 AM
  4. Quick question... Get Current Page
    By pensive612 in forum General Questions
    Replies: 1
    Last Post: 30 Nov 2006, 05:28 PM
  5. how to get the current order no?
    By wdrwc in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Jul 2006, 02:46 AM

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