nelero
Forum Replies Created
-
Forum: Plugins
In reply to: [Theme and plugin translation for Polylang (TTfP)] esc_html__ not detectedI’m the administrator, however your link send the wordpress page “Sorry, you don’t have permission to access this page.
And there is no menu to access “import/export strings”Thanks for your reply.
I use 3.4.0 versionas i explained,
the name for texdomain picked by the plugin is the folder name, like returned by the function get_template()
This name is listed in Languages > Export/Import translations in “Themes” section.But when the textdomain declared in the template is not the same as the folder’s template, it’s not found.
So i gave you the code to find the right textdomain in this case.Ex :
folder’s name : marketor2021Headers in style.css :
/* Theme Name: Marketor 2021 Theme URI: https://www.marketor.com/ Description: Marketor 2021 Author: Marketor INC Author URI: https://www.marketor.com/ Version: 1.0.0 License: GNU General Public License v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: Text Domain: marketor */
As you see, the folder’s name is different for the textdomain used.
And so the plugin doesn’t list marketor in Languages > Export/Import translations but only list marketor2021.
So every string in theme files which are
<?php echo esc_html("Test2 esc_html with domain", "marketor"); ?>
will not be listed
but
<?php echo esc_html("Test2 esc_html with domain", "marketor2021"); ?>
will bemaybe you should use the “Text Domain” filled in the style.css
To find it :
wp_get_theme
which returns an object data. So to identify a textdomain or to fallback to folder’s name if not written, we could use this code<?php $theme_info = wp_get_theme(); $text_domain = $theme_info->get('TextDomain'); $text_domain = (empty($text_domain)?get_template():$text_domain); ?>
But my words is still not found ??
I understood why :
my theme is called marketor2021
but the domain of the string is marketor<?php echo esc_html(‘Address’,’marketor’); ?>
so there is no TTfp::marketor even after checking again via import/export translations
Thanks a lot !
super reactive !Forum: Plugins
In reply to: [Mailjet Email Marketing] Advanced form customization is not openingHi,
no errors in console, but advanced settings not working- This reply was modified 5 years, 5 months ago by nelero.
Forum: Plugins
In reply to: [WP Cloudy] W3C validationI’ve the same problem here
https://www.ads-software.com/support/topic/w3c-validation-22/Forum: Plugins
In reply to: [WP Cloudy] W3C validationok, so my ticket is the same as this one https://www.ads-software.com/support/topic/w3c-validation-20/
To fix this error, in the file wp-content/plugins/all-in-one-event-calendar/app/view/event/content.php
Just after the line
public function get_content_img_url( Ai1ec_Event $event, &$size = null ) {
add :
$attachment_url = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );
and replace the line just after :
$url_featured_image = ( ! empty ( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ) ) ? wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ) : null );
by
$url_featured_image = ( ! empty ( $attachment_url ) ? wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ) : null );
Forum: Plugins
In reply to: [WP Cloudy] Widget doesn’t use WPML language configSo i solved it in modifying Wp-cloudy.
When ajax call is made, we lost the current language.
So in wpcloudy.php file, i added the querystring variable lang.
Line 105 :
wp_localize_script( 'wpc-ajax', 'wpcAjax', admin_url( 'admin-ajax.php' ) . "?lang=" . substr(get_locale(),0,2) );
and optionaly, line 131 :
wp_localize_script( 'wpc-ajax', 'wpcAjax', admin_url( 'admin-ajax.php' ) . "?lang=". substr(get_locale(),0,2) );
And it works like a charm.
get_locale() function returns the current language and is well overriden by WPML !Can you merge this fix in the next release ?
Thanks
- This reply was modified 7 years, 7 months ago by nelero.
Forum: Plugins
In reply to: [Contact Form 7] class, adding characters like [ or ] or ,Hi,
is there a solution instead of switching to another plugin ?Forum: Plugins
In reply to: [WP Cloudy] Display weather in different languages with WPMLSame problem as here : https://www.ads-software.com/support/topic/language-wp-cloudy/
Forum: Plugins
In reply to: [WP Cloudy] Language WP-Cloudyyes this is typically my case : the shortcode is in the page (php) of the theme and not in a widget.
Forum: Plugins
In reply to: [WP Cloudy] Language WP-CloudyI added a display for get_locale() in wpcloudy_init() function, just before load_plugin_textdomain and it displays en_US on english pages, and fr_FR on french pages. So the locale is well overrided by WPML.
but WPCloudy doesn’t take care of this.