Iran
|
i put this before return $data statement , function : cachedata, file: function_core.php (DRAFT)- if(file_exists(DISCUZ_ROOT.'./source/language/'.$_G['language'].'/lang_db.php')){
- include DISCUZ_ROOT.'./source/language/'.$_G['language'].'/lang_db.php';
- foreach($data['setting']['navs'] as $nav => $key){
- $nvnm = strtolower($key['navname']);
- if(array_key_exists($nvnm,$lang_nav)){
- $lang_new = $lang_nav[$nvnm];
- $nav_new = $string = preg_replace("/(?<=>)$nvnm(?=<)/i",$lang_new,$key['nav']);
- $nav_new = preg_replace("/(?<=title\=")$nvnm(?=")/i",$lang_new,$nav_new);
-
- $data['setting']['navs'][$nav]['navname'] = $lang_new;
- $data['setting']['navs'][$nav]['nav'] = $nav_new;
- }
- }
-
- foreach($data['setting']['mynavs'] as $nav => $key){
- $nvnm = strtolower($key['navname']);
- if(array_key_exists($nvnm,$lang_mynavs)){
- $lang_new = $lang_mynavs[$nvnm];
- $nav_new = $string = preg_replace("/(?<=>)$nvnm(?=<)/i",$lang_new,$key['code']);
-
- $data['setting']['mynavs'][$nav]['navname'] = $lang_new;
- $data['setting']['mynavs'][$nav]['code'] = $nav_new;
- }
- }
-
- foreach($data['setting']['topnavs'] as $tnav => $tkey){
- foreach($tkey as $nav => $key){
- $nvnm = strtolower($key['navname']);
- if(array_key_exists($nvnm,$lang_mytopnavs)){
- $lang_new = $lang_mytopnavs[$nvnm];
- $nav_new = $string = preg_replace("/(?<=>)$nvnm(?=<)/i",$lang_new,$key['code']);
- $data['setting']['topnavs'][$tnav][$nav]['navname'] = $lang_new;
- $data['setting']['topnavs'][$tnav][$nav]['code'] = $nav_new;
- }
- }
- }
-
- foreach($data['usergroups'] as $uiz => $key){
- $gtitle = strtolower($key['grouptitle']);
- if(array_key_exists($gtitle,$lang_grouptitle)){
- $data['usergroups'][$uiz]['grouptitle'] = $lang_grouptitle[$gtitle];
- }
- }
- $docond=1;
- do {
- // For Multi usergroup users
- $dougrp = 'usergroup_'.$docond;
- if(isset($data[$dougrp])){
- $gtitle = strtolower($data[$dougrp]['grouptitle']);
- if(array_key_exists($gtitle,$lang_grouptitle)){
- $data[$dougrp]['grouptitle'] = $lang_grouptitle[$gtitle];
- }
- $docond++;
- } else {
- $docond = false;
- }
-
- } while($docond);
- }
Copy the Code and i put blew code in source/language/fa/lang_db.php- <?php
- $lang_nav = array(
- "portal" => "پورتال",
- "space" => "خانه",
- "ranklist" => "برترین ها",
- "forum" => "انجمن",
- "groups" => "گروه ها",
- );
-
- $lang_mynavs = array(
- "my friends" => "دوستان",
- "my threads" => "موضوعات",
- "my favorites" => "علاقه مندی",
- "magics" => "ابزارک",
- "medals" => "مدال ها",
- "tasks" => "وظایف",
- );
-
- $lang_mytopnavs = array(
- "set favorite" => "افزودن به علاقه مندی",
- "set home" => "صفحه خانگی",
- );
-
- $lang_grouptitle = array(
- "administrator" => "رئیس",
- "super moderator" => "مدیر ویژه",
- "moderator" => "مدیر",
- "read only" => "فقط بازدید",
- "banned" => "مسدود شده",
- "ip ban" => "مسدودست آی پی",
- "visitor" => "بازدید کننده",
- "waiting for verification" => "در انتظار تایید",
- "restricted membership" => "گروه کاربری محدود شده",
- "website editor" => "ویرایشگر سایت",
- "information ombudsman" => "بازرس اطلاعات",
- "auditor" => "بررسی کننده",
- "newbie" => "کاربر جدید",
- "member" => "کاربر",
- "full member" => "کاربر متوسط",
- "senior member" => "کاربر نیمه حرفه ای",
- "gold member" => "کاربر طلایی",
- "veteran" => "کاربر ویژه",
- );
-
- $lang_points = array(
- "reputation" => "انرژی",
- "points" => "فعالیت",
- "contribution" => "تعامل",
- );
-
- ?>
Copy the Code |
|