Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Change zen cart defined icon.gif to text?

Change zen cart defined icon.gif to text?

Locked

Started by nev on 1 Jun 2008, 10:02 PM · Views: 1,086

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
1 Jun 2008, 10:02 PM
#1
nev avatar

nev

New Zenner

Join Date:
Nov 2007
Location:
Canada
Posts:
49
Plugin Contributions:
0

Post #1 by nev

I would like to change the image link used for the language option to the text name of the language.

the language option is in the header and its defined in tpl_header_languages.php

$content = "  ";

  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'], '', '', 'align="middle"') . '</a>  ';
  }
  
  echo $content;
?>

looking for a reference to the language image file icon.gif I found one instance
/admin/languages.php
Line #396 :

$contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_IMAGE . '<br>' . zen_draw_input_field('image', 'icon.gif'));

Looking for TEXT_INFO_LANGUAGE_IMAGE
I find in /admin/includes/languages/english/languages.php

define('TEXT_INFO_LANGUAGE_NAME', 'Name:');
define('TEXT_INFO_LANGUAGE_CODE', 'Code:');
define('TEXT_INFO_LANGUAGE_IMAGE', 'Image:');

and in /admin/languages.php

      $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_NAME . '<br>' . zen_draw_input_field('name'));
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_CODE . '<br>' . zen_draw_input_field('code', '', 'maxlength="2" size="4"'));
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_IMAGE . '<br>' . zen_draw_input_field('image', 'icon.gif'));
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_DIRECTORY . '<br>' . zen_draw_input_field('directory'));

and a few lines lower

      $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_NAME . '<br>' . zen_draw_input_field('name', $lInfo->name));
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_CODE . '<br>' . zen_draw_input_field('code', $lInfo->code, 'maxlength="2" size="4"'));
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_IMAGE . '<br>' . zen_draw_input_field('image', $lInfo->image));
      $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_DIRECTORY . '<br>' . zen_draw_input_field('directory', $lInfo->directory));

So the question is do I have to define the name again since its already defined in /admin/includes/languages/english/languages.php

define('TEXT_INFO_LANGUAGE_NAME', 'Name:');

and where /what /how needs to be changed to display the text link instead of an images.

Thanks
nev