International zone > فارسی - Persian

how to have فارسی instead of persian in "select language"

(1/3) > >>

Kamran:
Hi,

Please let me know how I can have فارسی instead of persian in "select language". I mean I want to change the text style.

Thanks,
Kamran

apkoutsou:
In front or back end? In both cases you have to change the language files.

Kamran:
Hi apkoutsou,

I meant in front end. I guess I have to add
define('      ', 'فارسی');
to persian.php file in language directory. Am I right? In this case what should I write between '    ' marks?

thanks for your help.
Kamran

apkoutsou:
I look better into it and I was wrong! Unfortunately you have to change the languge module php code. The problem is that the language module pools languages name from the configuration.php file. But if you change the configuration file so that instead of persian to return فارسی the module will not work at all.

So replace lines 221-227 of /modules/mod_language.php file to this:

--- Code: ---if ($langx == 'persian') {
$persianlang = 'فارسی';
echo '<a href="'.$link.'" title="'.$persianlang.'">';
if (($this->lng_style == 0) && file_exists($mainframe->getCfg('absolute_path').'/language/'.$langx.'/'.$langx.'.gif')) {
echo '<img src="'.$mainframe->getCfg('ssl_live_site').'/language/'.$langx.'/'.$langx.'.gif" border="0" alt="'.$persianlang.'" style="vertical-align:middle" />';
} else {
echo ($lang == $langx) ? '<strong>'.$persianlang.'</strong>' : $persianlang;
}
echo '</a> '._LEND;
} else {
echo '<a href="'.$link.'" title="'.$langx.'">';
if (($this->lng_style == 0) && file_exists($mainframe->getCfg('absolute_path').'/language/'.$langx.'/'.$langx.'.gif')) {
echo '<img src="'.$mainframe->getCfg('ssl_live_site').'/language/'.$langx.'/'.$langx.'.gif" border="0" alt="'.$langx.'" style="vertical-align:middle" />';
} else {
echo ($lang == $langx) ? '<strong>'.$langx.'</strong>' : $langx;
}
echo '</a> '._LEND;
}

--- End code ---

I cannot test it, but I think that this will work for you...

Kamran:
Hi apkoutsou,

Thank you for your help.
I replaced the codes and persian is replaced by فارسی in language selection in front end but its link does not work. In other words, I cannot link to persian pages and only english pages are working. Please let me know what I should do now.

Thanks,
kamran

Navigation

[0] Message Index

[#] Next page

Go to full version