<div class="wrap">

    <?php screen_icon(); ?>

	<form action="options.php" method="post" id="<?php echo $plugin_id; ?>_options_form" name="<?php echo $plugin_id; ?>_options_form">

	<?php settings_fields($plugin_id.'_options'); ?>

    <h2><?php _e('WP Persian','wp-persian') ?></h2>
	<h3><?php _e('Language','wp-persian') ?></h3>
    <table class="form-table">
		<tbody>
		   <tr>
			 <th scope="row">
                 <label for="wpp_admin_locale">
                     <?php _e('Admin Panel','wp-persian') ?></label>
			</th>
			<td>		 
			<select name="wpp_admin_locale" id="wpp_locale">
<?php // if(file_exists(ABSPATH . '/wp-content/languages/admin-fa_IR.mo')):?>
        		<option value="fa_IR" <?php echo get_option('wpp_admin_locale')=='fa_IR'?'selected="selected"':'' ?>><?php _e('Persian','wp-persian') ?></option>
<?php // endif; ?>
        		<option value="en_US" <?php echo get_option('wpp_admin_locale')!='fa_IR'?'selected="selected"':'' ?>><?php _e('English','wp-persian') ?></option>
        	</select>
             </td>
		   </tr>
		   
		   <tr>
			 <th scope="row">
                 <label for="wpp_frontpage_locale">
                     <?php _e('Frontpage','wp-persian') ?></label>
			</th>
			<td>		 
			<select name="wpp_frontpage_locale" id="wpp_locale">
<?php if(file_exists(ABSPATH . '/wp-content/languages/fa_IR.mo')):?>
        		<option value="fa_IR" <?php echo get_option('wpp_frontpage_locale')=='fa_IR'?'selected="selected"':'' ?>><?php _e('Persian','wp-persian') ?></option>
<?php endif; ?>
        		<option value="en_US" <?php echo get_option('wpp_frontpage_locale')!='fa_IR'?'selected="selected"':'' ?>><?php _e('English','wp-persian') ?></option>
        	</select>
             </td>
		   </tr>
		 
		</tbody>
	</table>
	
	
	<h3><?php _e('Permalink','wp-persian') ?></h3>
    <table class="form-table">
		<tbody>
		   <tr>
			 <th scope="row" class="th-full">
                 <label for="wpp_convert_permalink">
				 <input name="wpp_convert_permalink" type="checkbox" id="wpp_convert_permalink" value="1" <?php echo get_option('wpp_convert_permalink')=='1'?'checked="checked"':'' ?>>
				 <?php _e('Convert permalinks.','wp-persian') ?></label>
			</th>
		   </tr>
		</tbody>
	</table>

	<h3><?php _e('Date & Time','wp-persian') ?></h3>
    <table class="form-table">
		<tbody>
		   <tr>
			 <th scope="row" class="th-full">
                 <label for="wpp_convert_admin_date">
				 <input name="wpp_convert_admin_date" type="checkbox" id="wpp_convert_admin_date" value="1" <?php echo get_option('wpp_convert_admin_date')=='1'?'checked="checked"':'' ?>>
				 <?php _e('Convert dates in wordpress administrator panel.','wp-persian') ?></label>
			</th>
		   </tr>
		   
		   	<tr>
			 <th scope="row" class="th-full">
                 <label for="wpp_convert_frontpage_date">
				 <input name="wpp_convert_frontpage_date" type="checkbox" id="wpp_convert_frontpage_date" value="1" <?php echo get_option('wpp_convert_frontpage_date')=='1'?'checked="checked"':'' ?>>
				 <?php _e('Convert dates in wordpress frontpage.','wp-persian') ?></label>
			</th>
		   </tr>

		   
		</tbody>
	</table>
	<?php submit_button(); ?>

	</form>

</div>
