Post by mehdi » Sat Dec 01, 2007 5:48 am

In my country we use Persian (Farsi) language that your cms doesn’t support it.
I have tried to make my own language pack by adding Farsi code in \mysite\library\language\ language.php
$languages = array(
                        'fa' => 'fa|farsi',
And also I built persain.php and used it in both admin and catalogue language portion
$_['code']                  = 'fa';
$_['charset']              = 'utf-8';
$_['direction']            = 'ltr';
$_['locale']                = 'fa_FA.UTF-8,fa_FA,farsi';
But when i enter for example "product name" in my own language
And look for it in my browser it will appear some thing like this "? ? ? ? ? ? ? ".
When I manually edit it from PHP Myadmin panel/ocart database/ product name / it will appear in browser correctly.
any idea will be helpful.
Last edited by mehdi on Sat Dec 01, 2007 8:59 pm, edited 1 time in total.

Newbie

Posts

Joined
Sat Dec 01, 2007 5:40 am

Post by mehdi » Sun Dec 02, 2007 8:22 pm

hi everyone
i have solved the problem by adding (mysql_query( "SET NAMES 'utf8'");)
in library\database\database.php
function connect($server, $username, $password, $database) {
if (!$this->connection = mysql_connect($server, $username, $password)) {
      exit('Error: Could not make a database connection using ' . $username . '@' . $server);
    }

    if (!mysql_select_db($database, $this->connection)) {
      exit('Error: Could not connect to database ' . $database);
    }

mysql_query("set character set utf8");
mysql_query( "SET NAMES 'utf8'");  
  }

Newbie

Posts

Joined
Sat Dec 01, 2007 5:40 am

Post by fancymask » Sat Apr 26, 2008 2:21 am

:-* :-* Thank you very much! It works!

Newbie

Posts

Joined
Fri Apr 25, 2008 4:52 pm

Post by lajevardi » Sun May 04, 2008 10:41 am

thanks for share.

Newbie

Posts

Joined
Sun May 04, 2008 9:28 am
Who is online

Users browsing this forum: No registered users and 0 guests