Thread: Force Language

Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Sep 2006
    Posts
    10
    Plugin Contributions
    0

    Default Force Language

    Hi,
    i would like have in shop one language for customers, but leaved english language support.

    In the even of visitors English pages create redirecting on deafult language and hold all variables in address bar.

    This exacly do language icons. I need teplate linecode for one default language,that i can add als meta code in page header. xxx

    PHP Code:
    <head>
    ...
    <?php if (defined('FORCE_LANGUAGE')) { ?>
    <meta http-equiv="refresh" content="1;url=<?php xxx ?>" />
    <?php //endif FORCE_LANGUAGE ?>
    ...
    </head>
    also

    meta_tags.php appropriate for english languare
    ------------------
    PHP Code:
    // Define FORCE_LANGUAGE  , if empty redirecting will be dissabled
    define('FORCE_LANGUAGE''yes'); 


    thanx for advices

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Force Language

    Find directions for another language here Install language pack

    ZenCart will then when configured, display the selected language.

    I think that this is what you were asking
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Sep 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Force Language

    this is tpl_languages.php
    tpl_languages.php show languages flags in frontpages (sidebox)

    PHP Code:
     $content "";
      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent centeredContent">';

      
    $lng_cnt 0;
      while (list(
    $key$value) = each($lng->catalog_languages)) {
        
    $content .= '<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language''currency')) . 'language=' $key$request_type) . '">' zen_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' $value['image'], $value['name']) . '</a>&nbsp;&nbsp;';
        
    $lng_cnt ++;
        if (
    $lng_cnt >= MAX_LANGUAGE_FLAGS_COLUMNS) {
          
    $lng_cnt 0;
          
    $content .= '<br />';
        }
      }
    $content .= '</div>'
    i need code, wich show only one deafault language (even 2 languages are instaled)

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Force Language

    If you don't want to give customers the option of selecting another language, simply turn off the language sidebox in Admin->Tools->Layout Boxes Controller
    .

    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.

  5. #5
    Join Date
    Sep 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Force Language

    even then customers can (inadvertently) open shop with another language.

  6. #6
    Join Date
    Sep 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Force Language

    i was trying this, but not working :-/

    PHP Code:
    <meta http-equiv="refresh" content="1;url=<?php   zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language''currency')) . 'language=' $key$request_type) . '; ?>" />

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Force Language

    If your default language is set to Spanish, and you provide the customer with no links to change the language, then the only way for the customer to change the language is if they know Zen Cart well enough to know how to override it by adding parameters to the URL.

    You seem to be convinced that there is a problem. Perhaps you can explain what is the exact problem you are experiencing?
    .

    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.

  8. #8
    Join Date
    Sep 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Force Language

    i would like have in shop rules.

    2 languages EN CZ

    and make EN for customers unavailable.

    how?

    set deafaul CZ, disable block and

    add to EN meta_tags.php meta tag for automatic redirection

    examp. from url:

    HTML Code:
    http://localhost/zen/index.php?main_page=product_info&products_id=85&language=en
    to

    HTML Code:
    http://localhost/zen/index.php?main_page=product_info&products_id=85&language=cz

  9. #9
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Force Language

    why ?
    .

    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.

  10. #10
    Join Date
    Sep 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Force Language

    i still have problem with default languge. Even its set def. lang. CZ, sometimes (depend on browser, OS, links from others websites, etc. ) customer open shop in EN.

    I will not fill all fields like description by products etc. in two languages. So they are EN empty.

    And if customer (somehow) open shop in EN language, isnt shop, but chaoss.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Parcel Force
    By Nick1973 in forum Addon Shipping Modules
    Replies: 4
    Last Post: 6 Oct 2011, 11:59 PM
  2. Multiple language, can only see english language
    By stefanl in forum General Questions
    Replies: 2
    Last Post: 2 Oct 2011, 04:54 PM
  3. How to set a default country per language for multi language sites
    By lacabessa in forum Addon Language Packs
    Replies: 2
    Last Post: 18 Nov 2006, 11:00 PM
  4. Issues with French language (or alternate language) packs
    By mommydesigns in forum Addon Language Packs
    Replies: 1
    Last Post: 23 Aug 2006, 05:13 PM

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