Change the text on the Publish button

If you look into /wp-admin/edit-form-advanced.php, you will find the meta box: add_meta_box(‘submitdiv’, __(‘Publish’), ‘post_submit_meta_box’, $post_type, ‘side’, ‘core’); Note the __(‘Publish’) – the function __() leads to translate() where you get the filter ‘gettext’. There are two ways to handle your problem: 1. Address the string in a single specialized function (be sure to match the … Read more

Translating form labels shortcode output

If anyone is looking for a solution, here is a way (probably not the better one) to achieve it: add_filter(‘widget_text’, ‘filtering_form_labels’); function filtering_form_labels($html) { if ( ICL_LANGUAGE_CODE==’en’ ) {/*ICL_LANGUAGE_CODE used in WPML to know the active language*/ $esp = array(‘Nombre’, ‘Apellidos’, ‘Suscribirse’); /*Array with words to be replaced*/ $eng = array(‘First Name’, ‘Last Name’, ‘Subscribe’); … Read more

Translate placeholder text in search field

Just as any regular string, you can use <?php esc_attr_e( ‘Your Search term here’, ‘your_theme_slug’ ); ?> So your code for the <input> would look like <input type=”search” class=”search-field” placeholder=”<?php esc_attr_e( ‘Your Search term here’, ‘your_theme_slug’ ); ?>” value=”<?php echo esc_attr( $search ); ?>” name=”s”> WPML, as well as WordPress, uses the PHP get_text() function. … Read more

White Space on translated strings lost

The actual code is <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( ”, __( ‘, ‘, ‘timo’ ) ); if ( $tags_list ) : ?> <span class=”tags-links”> <?php printf( __( ‘Tagged %1$s’, ‘timo’ ), $tags_list ); ?> </span> <?php endif; // End if $tags_list ?> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)