Results 1 to 9 of 9
  1. #1
    Join Date
    May 2007
    Posts
    2
    Plugin Contributions
    0

    Default CATEGORIES limits to only four first letters of each word.

    Hi,
    by trying to "Zen-Cart" (v.1.3.5 & 1.3.7) the Russian language the following problem has occured:
    the translation of words in the directory "CATEGORIES" limits to only four ( 4 ) first letters of each word.
    That problem occurs only by the Russian language since the website includes already 3 other
    languages (English, German, Spanish) thet work perfectly.

    Please help us by the solution!

  2. #2
    Join Date
    May 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: CATEGORIES limits to only four first letters of each word.

    Quote Originally Posted by Rol View Post
    Hi,
    by trying to "Zen-Cart" (v.1.3.5 & 1.3.7) the Russian language the following problem has occured:
    the translation of words in the directory "CATEGORIES" limits to only four ( 4 ) first letters of each word.
    That problem occurs only by the Russian language since the website includes already 3 other
    languages (English, German, Spanish) thet work perfectly.

    Please help us by the solution!

    Thanks, Problems is already solved.

  3. #3
    Join Date
    Apr 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: CATEGORIES limits to only four first letters of each word.

    Hi!
    I have the same problem, how to solve it?
    Tahnks!

  4. #4
    Join Date
    Apr 2008
    Posts
    59
    Plugin Contributions
    1

    Default Re: CATEGORIES limits to only four first letters of each word.

    I had same problem, first, i increased all values VBCHAR in my database from 16/32/64 to 255 it started working nice... but it was not what i wanted.. so i converted all my files (Bulgarian) to UTF-8, done some fixing (mentioned on that forum) in /public_html/includes/classes/db/mysql/query_factory.php
    and the shop started working...
    if your shop is new u can do things fast (well not too much).
    1) obtain Notepad ++
    2) download all files from /include/languages/YOUR_LOCAL_LANGUAGE_HERE/*.php
    and
    /include/languages/YOUR_LOCAL_LANGUAGE_HERE.php

    3) open them in Npp+
    4) do Format/convert to UTF-8 Without BOM (in the bottom right corner, there should be 'ANSI as UTF-8')
    5) save file
    6) repeat 3-5 untill u process all files.

    7) then open
    /public_html/includes/classes/db/mysql/query_factory.php

    find in it (arround line 26)
    Code:
      function connect($zf_host, $zf_user, $zf_password, $zf_database, $zf_pconnect = 'false', $zp_real = false) {
    //@TODO error class required to virtualise & centralise all error reporting/logging/debugging
        $this->database = $zf_database;
        if (!function_exists('mysql_connect')) die ('Call to undefined function: mysql_connect().  Please install the MySQL Connector for PHP');
        if ($zf_pconnect != 'false') {
          $this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
        } else {
        // pconnect disabled ... leaving it as "connect" here instead of "pconnect"
          $this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
        }
        if ($this->link) {
          if (@mysql_select_db($zf_database, $this->link)) {
           
            return true;
          } else {
            $this->set_error(mysql_errno(),mysql_error(), $zp_real);
            return false;
          }
        } else {
          $this->set_error(mysql_errno(),mysql_error(), $zp_real);
          return false;
        }
      }
    and replace it with:
    Code:
      function connect($zf_host, $zf_user, $zf_password, $zf_database, $zf_pconnect = 'false', $zp_real = false) {
    //@TODO error class required to virtualise & centralise all error reporting/logging/debugging
        $this->database = $zf_database;
        if (!function_exists('mysql_connect')) die ('Call to undefined function: mysql_connect().  Please install the MySQL Connector for PHP');
        if ($zf_pconnect != 'false') {
          $this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
        } else {
        // pconnect disabled ... leaving it as "connect" here instead of "pconnect"
          $this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
        }
        if ($this->link) {
          if (@mysql_select_db($zf_database, $this->link)) {
            mysql_query("SET NAMES UTF8;");
             $this->db_connected = true;
            return true;
          } else {
            $this->set_error(mysql_errno(),mysql_error(), $zp_real);
            return false;
          }
        } else {
          $this->set_error(mysql_errno(),mysql_error(), $zp_real);
          return false;
        }
      }
    8) then goto your database, and change collation to ALL fields to uft8_general_ci instead of cp_1252 (1251 in my case) (this is boring part)
    9) now try to add new product...
    10) if 9 is successful, then remove all old products and add new ones. U have to change all values set before UTF-8 conversion as Store name, Store owner etc. etc. etc.

    11) if that works and help u solve your problems... well i drink beer
    if not... contact me, i might be able to help u.
    Lazy_666
    The One & Only
    http://www.nani-na.biz

  5. #5
    Join Date
    Apr 2008
    Posts
    13
    Plugin Contributions
    0

    Have a Drink Re: CATEGORIES limits to only four first letters of each word.

    Thank you, lazy_666!
    I am setting bulgarian too :)
    I will try your way for encoding, because i solve the 4-letter problem with increasing values (VBCHAR), but i still have problem with cirillyc in reviews

    Thanks again!

  6. #6
    Join Date
    Apr 2008
    Posts
    59
    Plugin Contributions
    1

    Default Re: CATEGORIES limits to only four first letters of each word.

    i tried some workarrounds... and the got really pissed... so it was faster for me to transleate whole site from the scratch.
    I can send u translated version... but the database u should handle yourself...
    i am not MySQL pro ... i am not PHP pro ;)
    if u google u can find a way to convert your database to UTF-8 and get rid of those 1251 things wich might work fine... if the year is 1995 but now it should be replaced with something more... flexible (dont kill me, that is just my oppinion based on experience with 1251 encoding)

    And if u decide to use that language pack... keep in mind it HAVE to be examined closely, just in case i missed something or i am trying to trick u out ;)
    www.nani-na.biz is the site working with it... if that suits you.. contact me.
    Lazy_666
    The One & Only
    http://www.nani-na.biz

  7. #7
    Join Date
    Apr 2008
    Posts
    59
    Plugin Contributions
    1

    Default Re: CATEGORIES limits to only four first letters of each word.

    it seems i have made mistake by coloring lines...
    not
    Code:
              mysql_query("SET NAMES UTF8;");
              $this->db_connected = true;
              return true;
    but

    Code:
            mysql_query("SET NAMES UTF8;");
            $this->db_connected = true;
            return true;
    i am sorry, i will try not to sleep again when i am posting.
    Lazy_666
    The One & Only
    http://www.nani-na.biz

  8. #8
    Join Date
    Apr 2008
    Posts
    59
    Plugin Contributions
    1

    red flag Re: CATEGORIES limits to only four first letters of each word.

    Small clarification. Please accept my apologies.
    When you convert bulgarian files into UTF-8 (ANSI as utf-8), please convert EVERY SINGLE FILE (English ones too).
    Otherwise you might not lie the result.

    Special thanks to "razhore" who asked me to investigate this issue deeper.
    Lazy_666
    The One & Only
    http://www.nani-na.biz

  9. #9
    Join Date
    Feb 2005
    Posts
    3
    Plugin Contributions
    0

    Default Re: CATEGORIES limits to only four first letters of each word.

    Done everything you wrote here and it's still not working.

    Any idea ?

    Thanks a lot for any help

    Daniel

 

 

Similar Threads

  1. Replies: 6
    Last Post: 21 Nov 2010, 01:35 PM
  2. only 5 Greek letters to the categories...
    By AlexG in forum General Questions
    Replies: 3
    Last Post: 31 Oct 2010, 10:05 AM
  3. Replies: 1
    Last Post: 9 Mar 2009, 11:40 PM
  4. Category Name - only four letters showed?
    By urbanlife in forum Setting Up Categories, Products, Attributes
    Replies: 17
    Last Post: 28 Jul 2008, 02:30 PM
  5. A Categories / Products can only be 31 letters?
    By liah in forum Templates, Stylesheets, Page Layout
    Replies: 19
    Last Post: 7 Nov 2007, 04:04 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