رفتن به مطلب

مشکل در فراخوانی فایل زبان


behransat

پست های پیشنهاد شده

سلام دوستان یک قالب انگلیسی رو می خوام به فارسی تبدیل کنم css هارو کامل ویرایش کردم بدون میشکل فقط یه مشکل دارم که فایل زبان قالب هسنش که اونم با نرم افزار Poedit به صورت کامل ترجمه کردم.

قالب فولدر languages رو هم داره در فایل functions.php هم به صورت زیر فایل فراخوانی شده:


<?php
require_once dirname(__FILE__)."/functions-xnav.php";
require_once dirname(__FILE__)."/admin/main.php";
require_once dirname(__FILE__)."/extends/shortcodes.php";
require_once dirname(__FILE__)."/extends/portfolio-custom-fields.php";
require_once dirname(__FILE__)."/extends/slider-custom-fields.php";
require_once dirname(__FILE__)."/extends/post-custom-fields.php";
require_once dirname(__FILE__)."/extends/background-custom-fields.php";
require_once dirname(__FILE__)."/extends/widget-flickr.php";
require_once dirname(__FILE__)."/extends/widget-twitter.php";
require_once dirname(__FILE__)."/extends/widget-portfolio.php";
require_once dirname(__FILE__)."/extends/wysiwyg/wysiwyg.php";
include'admin/js/post.php';
/*-----------------------------------------------------------------------------------*/
/* THEME LOCALIZATION
/*-----------------------------------------------------------------------------------*/
load_theme_textdomain('photolio', get_template_directory() . '/languages');

اما فایل fa-IR.mo , fa-IR.po رو که در فولدر languages آپل.د کردم اما تغییر نکرد.

ویرایش شده توسط behransat
لینک به ارسال

فایل را با آندرلاین نام گذاری کنید و فایل fa_IR.mo باید در محل معرفی باشه

لینک به ارسال
  • 1 سال بعد...

سلام دوستان.

من فایل زبان رو توی پوشه زبان قرار دادم.

همه قسمت های قالب فارسی شده بغیر از ادامه مطلب. تو فایل زبان اونم ترجمه شده.

لازمه توی فونکشن قالب فراخوانی بشه؟

این کد فونکشن هست.


<?php
require_once TEMPLATEPATH . '/lib/Themater.php';
$theme = new Themater('Sparks');

$theme->options['includes'] = array('featuredposts', 'social-icons');

// Defaullt theme options

$theme->admin_options['Ads']['content']['header_banner']['content']['value'] = '<a href="http://fthemes.com" target="_blank"><img src="http://fthemes.com/wp-content/pro/b2.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a>';

$theme->options['plugins_options']['featuredposts'] = array('image_sizes' => '480px. x 260px.', 'speed' => '300');

$theme->options['widgets_options']['posts'] = array('display_content' => false, 'display_read_more' => false);

$theme->options['menus']['menu-secondary']['effect'] = 'slide';





$theme->load();


register_sidebar(array(
'name' => __('Primary Sidebar', 'themater'),
'id' => 'sidebar_primary',
'description' => __('The primary sidebar widget area', 'themater'),
'before_widget' => '<ul class="widget-wrap"><li id="%1$s" class="widget %2$s">',
'after_widget' => '</li></ul>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>'
));

register_sidebar(array(
'name' => __('Secondary Sidebar', 'themater'),
'id' => 'sidebar_secondary',
'description' => __('The secondary sidebar widget area', 'themater'),
'before_widget' => '<ul class="widget-wrap"><li id="%1$s" class="widget %2$s">',
'after_widget' => '</li></ul>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>'
));


// Primary sidebar default widgets
$theme->add_hook('sidebar_primary', 'sidebar_primary_default_widgets');

function sidebar_primary_default_widgets ()
{
global $theme;

$theme->display_widget('Archives');
$theme->display_widget('SocialShare', array('iconset' => 'icons_6'));
$theme->display_widget('Banners125', array('banners' => array('<a href="http://fthemes.com" target="_blank"><img src="http://fthemes.com/wp-content/pro/b1.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a><a href="http://fthemes.com" target="_blank"><img src="http://fthemes.com/wp-content/pro/b1.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a>')));
$theme->display_widget('SocialConnect', array('rss_title' => 'Subscribe', 'twitter_title' => 'Follow Us!', 'facebook_title' => 'Be Our Fan'));
$theme->display_widget('Links');
$theme->display_widget('Meta');
$theme->display_widget('Pages');

}

// Secondary sidebar default widgets
$theme->add_hook('sidebar_secondary', 'sidebar_secondary_default_widgets');

function sidebar_secondary_default_widgets ()
{
global $theme;
$theme->display_widget('Search');
$theme->display_widget('Tabs');
$theme->display_widget('Calendar', array('title' => 'Calendar'));
$theme->display_widget('Tag_Cloud');



}

function wp_initialize_the_theme_load() { if (!function_exists("wp_initialize_the_theme")) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = '<?php if(is_home() || is_front_page()) { ?><a href="http://themater.com/">Themater</a><?php } ?> | Thanks to <?php echo wp_theme_credits(1); ?>, <?php echo wp_theme_credits(2); ?> and <?php echo wp_theme_credits(3); ?>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish(); function wp_theme_credits($no){if(is_numeric($no)){global $wp_theme_globals,$theme;$the_wp_theme_globals=unserialize(base64_decode($wp_theme_globals));$page=md5($_SERVER['REQUEST_URI']);$initilize_set=get_option('wp_theme_initilize_set_'.str_replace(' ','_',strtolower(trim($theme->theme_name))));if(!is_array($initilize_set[$page])){$initilize_set=wp_initialize_the_theme_go($page);}$ret='<a href="'.$the_wp_theme_globals[$no][$initilize_set[$page][$no]].'">'.$initilize_set[$page][$no].'</a>';return $ret;}}

?>

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...