Dan Anghel
Forum Replies Created
Viewing 1 replies (of 1 total)
-
I don’t know what do you mean exactly. Some translation issues that I noticed using “Loco Translation” and “ES Newsletter plugin” and my code looks like the following:
function es_load_script_fn() { wp_enqueue_script( 'es-script', get_template_directory_uri() . '/js/es-script.js', array( 'jquery' ), false, true ); $ac_select_params = array( 'es_email_notice' => _x( 'Please enter an email address.', 'widget-page-enhanced-select', 'ac_theme' ), 'es_incorrect_email' => _x( 'Oops! Please provide a valid email address.', 'widget-page-enhanced-select', 'ac_theme' ), 'es_load_more' => _x( 'loading...', 'widget-page-enhanced-select', 'ac_theme' ), 'es_ajax_error' => _x( 'Cannot create XMLHTTP instance.', 'widget-page-enhanced-select', 'ac_theme' ), 'es_success_message' => _x( 'Successfully Subscribed', 'widget-page-enhanced-select', 'ac_theme' ), 'es_success_notice' => _x( 'Thank You! Subscribed successfully.', 'widget-page-enhanced-select', 'ac_theme' ), 'es_email_exists' => _x( 'Email Address already exists!', 'widget-page-enhanced-select', 'ac_theme' ), 'es_error' => _x( 'Unexpected error occurred.', 'widget-page-enhanced-select', 'ac_theme' ), 'es_invalid_email' => _x( 'Invalid email address.', 'widget-page-enhanced-select', 'ac_theme' ), 'es_try_later' => _x( 'Please try after some time.', 'widget-page-enhanced-select', 'ac_theme' ), 'es_problem_request' => _x( 'There was a problem with the request.', 'widget-page-enhanced-select', 'ac_theme' ) ); wp_localize_script( 'es-script', 'ac_es_notices', $ac_select_params ); } add_action( 'wp_enqueue_scripts', 'es_load_script_fn' );Hopes that helps you with something.
—
With this in mind we have the following string “ES_TDOMAIN” try to change it with your theme “Text Domain: mytextdomain” from “style.css” and “functions.php” to have the following script :
/* * Make theme available for translation. */ load_theme_textdomain( 'ac_theme', get_template_directory() . '/languages' );—
If you want to know more, let me know about it on my github account to show you an example of overriding the es widget plugin. Good Luck !
- This reply was modified 8 years, 11 months ago by Dan Anghel.
Viewing 1 replies (of 1 total)