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.
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'");
}
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'");
}
Who is online
Users browsing this forum: No registered users and 0 guests