sameh.serag
Forum Replies Created
-
Forum: Plugins
In reply to: [Loco Translate] Translation to Spainish doesn't workThanks a lot Tim for your help.
I already did debugging for the path but not with this hook. I tried it relative and absolute (in my hook)
Now It’s working! i debugged it in your hook and get the right path now
Thanks again for your help
Forum: Plugins
In reply to: [Loco Translate] Translation to Spainish doesn't workI established my plugin without existing of translation files. My plugin is just file called wp-kildo.php contain this code
<?php /* Plugin Name: wp kildo Description: wp kildo Version: 1.0 Text Domain: wp-kildo License: GPL */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } define('wp_kildo_PLUGIN_URL', plugin_dir_url(__FILE__)); define('wp_kildo_PLUGIN_PATH', plugin_dir_path(__FILE__)); //create 'wp-kildo' custom post type add_action('init', 'wp_kildo_init'); function wp_kildo_init() { $labels = array( 'name' => __('Kildo', 'wp-kildo'), 'singular_name' => __('Kildo', 'wp-kildo'), 'menu_name' => __(' Kildo', 'wp-kildo'), 'name_admin_bar' => __('Kildo', 'wp-kildo'), 'add_new' => __('Add New Kildo', 'wp-kildo'), 'add_new_item' => __('Add New Kildo', 'wp-kildo'), 'new_item' => __('New Kildo', 'wp-kildo'), 'edit_item' => __('Edit Kildo', 'wp-kildo'), 'view_item' => __('View Kildo', 'wp-kildo'), 'all_items' => __('Kildo List', 'wp-kildo'), 'search_items' => __('Search Kildo', 'wp-kildo'), 'parent_item_colon' => __('Kildo Kildo:', 'wp-kildo'), 'not_found' => __('No Kildo found.', 'wp-kildo'), 'not_found_in_trash' => __('No Kildo found in Trash.', 'wp-kildo') ); $args = array( 'labels' => $labels, 'description' => __('Description.', 'wp-kildo'), 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array('slug' => 'wp-kildo'), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'menu_icon' => "dashicons-location-alt", 'supports' => array('thumbnail') ); register_post_type('wp-kildo', $args); } // Load translation files if exists add_action( 'plugins_loaded', 'wp_kildo_load_plugin_textdomain' ); function wp_kildo_load_plugin_textdomain() { load_plugin_textdomain( 'wp-kildo', false, wp_kildo_PLUGIN_URL ); }
After installing the plugin i use your loco plugin to create translation files (Spanish) and i added translation to spanish and save.
But nothing appeared in spanish for my plugin.
You can install these code and test as you wish.
I hope you can find the issueThanks in advance
Forum: Plugins
In reply to: [Loco Translate] Translation to Spainish doesn't workYes it looked at the correct path
Forum: Plugins
In reply to: [Loco Translate] Translation to Spainish doesn't workThanks for your reply
Sorry it’s a mistake while coping the code to test plugin to simplify the plugin code
It should be wp-kildo_PLUGIN_URL instead of STORE_LOCATOR_PLUGIN_URL
It should all hyphen not underscore as in example files.Also i tried relative path and absolute path for function “load_plugin_textdomain”
Thanks in advance
Forum: Plugins
In reply to: [Loco Translate] Translation to Spainish doesn't workAnd here is sample of my plugin just to test translation
https://drive.google.com/file/d/0B0LLr-wdE_T6TlRTUE5MUVlkV0U/view?usp=sharingThanks in advance
Forum: Plugins
In reply to: [Loco Translate] Translation to Spainish doesn't workYes Tim, it’s created
wp_kildo-es_ES.mo and wp_kildo-es_ES.po under <DomainPath>/languages/And i am loading it like that
// Load translation files
add_action( ‘plugins_loaded’, ‘wp_kildo_load_plugin_textdomain’ );
function wp_kildo_load_plugin_textdomain() {
load_plugin_textdomain( ‘wp_kildo’, false, plugin_dir_url(__FILE__) . ‘/languages’ );
}Forum: Reviews
In reply to: [Verify Google Analytics & Webmaster Tools] Easy to use!Can you please post a screenshots of the plugin to ba able to see the interface and how it’s work before i try the plugin on my website.
Thanks