Does %s translated automatically?
printf ( __( '%s', 'theme-lang' ), $button );
that worked.. thanks dabaman..
I’m struggling on how to translate previous_post_link() and next_post_link() to other language.. or previous_posts_link() and next_posts_link()
here’s my code..
<?php next_posts_link( __( 'Older posts', 'sample-translate' ) ); previous_posts_link( __( 'Newer posts', 'sample-translate' ) ); ?>
but it’s not displaying the text older posts.. I also have this
<?php next_post_link( __( '%link', 'Older posts', 'sample-translate' ) ); previous_post_link( __( '%link', 'Newer posts', 'sample-translate' ) ); ?>
but it’s not translating.. anyone has a solution for it?
thanks for the help guys.. I will stick to what I used to do..
thank you for the help guys.. what about this for (custom fields and static variable)
<?php $variable = get_post_meta( $post->ID, "sample", true); printf( __( '%s', 'mytheme' ), $variable); $variable = "example"; printf( __( '%s', 'mytheme' ), $variable); ?>
for language localization.. is that ok? I want to translate the_title() to other language..
I’m confused on this, are these code’s acceptable? I want a language localization ready code..
<?php printf( __( '%1s', 'mytheme' ), the_title()); ?> <?php printf( __( '%2s', 'mytheme' ), the_content()); ?>
or prefer to write simple code like this
<?php the_title(); the_content(); ?>
I am using the 2nd codes but I want to use the 1st, any thoughts?
thanks jonathan.. I reset the php.ini file and all works fine now..
I already check that part but none of them work.. I search through google but can’t find any solution to it..