Is this a correct usage of esc_html_e?

<h1 class=”page-title”><?php esc_html_e( ‘Oops! Something went wrong.’, ‘_amnth’ ); ?></h1> I think this should simply use the __() function, since it’s a static string and it cannot be dynamic and in contrast, HTML. At the same time, here’s some source code from WooCommerce itself: <th class=”product-name”><?php esc_html_e( ‘Product’, ‘woocommerce’ ); ?></th> So, is it whenever … Read more

Is is safe to edit language files from wp-content/languages/plugins/woocommerce-ro_RO?

Is is safe to edit language files from wp-content/languages/plugins/woocommerce-ro_RO.mo(.po) ? I’m asking this because I don’t want them to be overriden on plugin update. Sorry if dumb question. 2 Answers 2 No, this is not safe. You shouldn’t make any changes to files within a plugin’s directory, all of those changes may be overridden. If … Read more

Some translations do not work in my template class

I am struggling with the translations of my theme. I use the function get_permalink_date of my class. The relevant snippet is: $permalink_title = sprintf( /* translators: 1 = Post Title, 2 = Author Name */ esc_html_x( ‘%1$s by %2$s’, ‘permalink title’, ‘themeberger’ ), __( ‘A post’, ‘themeberger’ ), get_the_author_meta( ‘display_name’, $this->post->post_author ) ); What I … Read more

Use WordPress default text domain for translating labels

I am wondering if there is a way to use the “default” text domain (“WordPress” or “default”) to translate labels. E.g I have following code: // Register Custom Taxonomy function custom_taxonomy() { $labels = array( ‘name’ => _x( ‘Press category’, ‘Taxonomy General Name’, ‘my_text_domain’ ), ‘singular_name’ => _x( ‘Press category’, ‘Taxonomy Singular Name’, ‘my_text_domain’ ), … Read more

WooCommerce: Translation lost on AJAX call in Checkout page [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic. Closed 7 years ago. Improve this question I’m using WooCommerce … Read more

Using polylang, how can I see which post is the “original” and which are the “translated children”? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers’ support routes. Closed 3 … Read more