Forums / Addon Language Packs / CATEGORIES limits to only four first letters of each word.

CATEGORIES limits to only four first letters of each word.

Locked

Started by rol on 21 May 2007, 6:42 AM · Views: 3,942

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
21 May 2007, 6:42 AM
#1
rol avatar

rol

New Zenner

Join Date:
May 2007
Posts:
2
Plugin Contributions:
0

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!

23 May 2007, 5:26 AM
#2
rol avatar

rol

New Zenner

Join Date:
May 2007
Posts:
2
Plugin Contributions:
0

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

Rol:

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.

30 Apr 2008, 10:13 AM
#3
crazybrat avatar

crazybrat

New Zenner

Join Date:
Apr 2008
Posts:
13
Plugin Contributions:
0

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

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

8 May 2008, 5:54 AM
#4
lazy_666 avatar

lazy_666

New Zenner

Join Date:
Apr 2008
Posts:
55
Plugin Contributions:
0

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)

  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:

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;");
[B] $this->db_connected = true;
return true;[/B]

} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
}

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 :laugh:
if not... contact me, i might be able to help u.

Lazy_666
The One & Only
http://www.nani-na.biz

8 May 2008, 6:36 AM
#5
crazybrat avatar

crazybrat

New Zenner

Join Date:
Apr 2008
Posts:
13
Plugin Contributions:
0

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 :blush:

Thanks again!

8 May 2008, 6:43 AM
#6
lazy_666 avatar

lazy_666

New Zenner

Join Date:
Apr 2008
Posts:
55
Plugin Contributions:
0

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 ;)
https://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

9 May 2008, 4:33 AM
#7
lazy_666 avatar

lazy_666

New Zenner

Join Date:
Apr 2008
Posts:
55
Plugin Contributions:
0

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

it seems i have made mistake by coloring lines...
not

          mysql_query("SET NAMES UTF8;");
[B]          $this->db_connected = true;
          return true;[/B] 
```but

   [B] mysql_query("SET NAMES UTF8;");
    $this->db_connected = true;[/B]
    return true;

Lazy_666
The One & Only
http://www.nani-na.biz

28 Nov 2008, 6:17 PM
#8
lazy_666 avatar

lazy_666

New Zenner

Join Date:
Apr 2008
Posts:
55
Plugin Contributions:
0

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

30 Nov 2008, 5:09 PM
#9
danysz avatar

danysz

New Zenner

Join Date:
Feb 2005
Posts:
3
Plugin Contributions:
0

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