Quote Originally Posted by explorer1979 View Post
Hi mc12345678,

While using Developer Tool for search all file

Only locked "/includes/templates/##########_temp/sideboxes/tpl_languages_header.php"

PHP Code:
<?php
/**
 * All Business Template
 *
 * @package templateSystem
 * @copyright Copyright 2007 iChoze Internet Solutions http://ichoze.com
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_languages.php 2982 2006-02-07 07:56:41Z birdbrain $
 */
 
  
$content "";
  
$content .= '<div class="form-language"><label for="select-language"></label>';
  
$lng_cnt 0;
  
   
$content .='<div class="select-language sbHolder" id="select-language">
   <a class="sbSelector" href="javascript:void(0)">'
.ucfirst($_SESSION['language']).'</a>
   <a class="sbToggle" href="javascript:void(0)"></a>
   '
;
   
$content .='<ul id="sbOption_language" class="sbOptions" style="display: none;"    >';
    while (list(
$key$value) = each($lng->catalog_languages)) {
     if(
$_SESSION['languages_code']=="$key"){
    
$content .= '<li class="lang"> <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'],'','','class="flag"').'&nbsp;'.$value['name']. '</a></li>';
     }else{
         
$content .= '<li class="lang"> <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'],'','','class="flag"').'&nbsp;'.$value['name']. '</a></li>';
     }
    
$lng_cnt ++;
    
  }
   
$content.="</ul></div>";
   
  


  
$content .= '</div>';

 
 
?>

As using the CSS class to lock
I only find above as

PHP Code:
$content .='<div class="select-language sbHolder" id="select-language">
   <a class="sbSelector" href="javascript:void(0)">'
.ucfirst($_SESSION['language']).'</a>
   <a class="sbToggle" href="javascript:void(0)"></a>
   '


So ... Why English work, but change to Chinese not work? Look it the coding
PHP Code:
ucfirst($_SESSION['language']) 
I'm sure that your second search (second post on this portion of the topic) resulted in several files that might seem appropriate, but the above search shows the issue as originating here.

As defined in the loaded file: includes/init_includes/init_languages.php, $_SESSION['language'] is assigned the directory name and is the session variable that is routinely used to pull language files from the correct language directory; however, the desire is to pull the 'name' key of the language that is currently in use... As it appears that $lng is currently defined, it is possible to use it in this code instead of (or in addition to having) the $_SESSION['language'] value. So from the init file there are the following assignments upon load:

Code:
  $_SESSION['language'] = (zen_not_null($lng->language['directory']) ? $lng->language['directory'] : 'english');
  $_SESSION['languages_id'] = (zen_not_null($lng->language['id']) ? $lng->language['id'] : 1);
  $_SESSION['languages_code'] = (zen_not_null($lng->language['code']) ? $lng->language['code'] : 'en');
In the file /includes/templates/##########_temp/sideboxes/tpl_languages_header.php (Guessing that the template's/folder name is one that has been considered by ZC to not be displayed), in this section:
Code:
$content .='<div class="select-language sbHolder" id="select-language">
   <a class="sbSelector" href="javascript:void(0)">'.ucfirst($_SESSION['language']).'</a>
   <a class="sbToggle" href="javascript:void(0)"></a>
   ';
One should replace ucfirst($_SESSION['language']) with:
Code:
$lng->catalog_languages[$_SESSION['languages_code']]['name']
And that will pull up the language as defined in your languages area of the admin, so as far as "capitalization" it should display exactly as entered which in your post from a few posts back this should have Chinese as entered. It's unfortunate that this hasn't been otherwise addressed, but considering most languages use a directory that has the full name of the language, it probably wasn't really noticed by many others. :)