How to translate placeholder?

In your code, you are concatenating a string but you are (from a comment) using a function that echos information– _e(). You can’t do that. You are printing the content wherever that array is constructed, which is not what you want. Use __() instead.

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

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

WordPress translation

OMFG that is the most stupid code I saw in core for some time. Don’t follow the comments there, if you want to use a different flavor of open sans just write a plugin that deregister the style and add the one you want to be used instead function replace_open_sans() { wp_deregister_style(‘open-sans’); wp_register_style(‘open-sans’, ‘http://fonts.googleapis.com/css?family=Open+Sans:300’); wp_enqueue_style(‘open-sans’); … Read more

Translate Plugin with french as base language

It is possible, but not good practice. Best thing would be to change all the strings to the english version and then translate it to french. Then you would be up to the standards. Since I do not have enough reputation points to add a comment, I hereby insert the link to a possible duplicate: … Read more

Adding a translation phrase to WordPress Theme

Here is an idea or two that you can pursue here: (CAVEAT: Untested) OPTION 1 In your template file (use a child theme if this is not your own theme), use get_locale in a conditional statement to check which language is set in WPLANG and then dish up the text according to the locale OPTION … Read more

Plugin translation not displaying

Ah ha! I found the answer, and it’s a really weird one. It just so happens that the particular strings I was trying to translate were the labels of required form fields, and looked like this: <?php echo ‘<label>’ . __( ‘Email *’, ‘cdashmm’ ) . ‘</label>’ ?> If I move the asterisk outside the … Read more

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