Posts by mabuc

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says


Does %s translated automatically?

example:

printf ( __( '%s', 'theme-lang' ), $button );

If you only have %s, it doesn’t need to be translated… It is different if you have something like this,

printf ( __( 'Click %s please ', 'theme-lang' ), $button );

thanks for clearing :)

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

Does %s translated automatically?

example:

printf ( __( '%s', 'theme-lang' ), $button );
1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

that worked.. thanks dabaman..

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

Hi,

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

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

thanks for the help guys.. I will stick to what I used to do.. :)

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

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); 
?>
1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

for language localization.. is that ok? I want to translate the_title() to other language..

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

I’m confused on this, are these code’s acceptable? I want a language localization ready code..

1.

<?php printf( __( '%1s', 'mytheme' ), the_title()); ?>
<?php printf( __( '%2s', 'mytheme' ), the_content()); ?>

or prefer to write simple code like this

2.

<?php 
   the_title(); 
   the_content(); 
?>

I am using the 2nd codes but I want to use the 1st, any thoughts?

thank you!

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

thanks jonathan.. I reset the php.ini file and all works fine now..

1179 posts
    Has referred 200+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
+2 more
mabuc says

I already check that part but none of them work.. I search through google but can’t find any solution to it..

by
by
by
by
by
by