Tag Info

New answers tagged

0

I think you need to understand how the code you are using works. The code that output the string is: <?php printf( __( '%s ago', 'wp-job-manager' ), human_time_diff( get_post_time( 'U' ), current_time( 'timestamp' ) ) ); ?> In the above code, __( '%s ago', 'wp-job-manager' ) is translated by wp-job-manager language files and %s is replaced by the ...


-1

Since your problem resolves around the fact that the WP theme developers used a function that doesn't have any hooks so we could easily alter the output, you're going to have to copy & paste the following code in your functions.php file function human_time_diff( $from, $to = '' ) { if ( empty( $to ) ) { $to = time(); } $diff = (int) ...


0

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 2 Create yourself a function (which will be the ideal solution ...


0

From my point of view, finding other alternative ways to translate a theme is not recommended and will be a setback in its popularity, as it will not allow users to add translations the same way they do for other themes and plugins. For alternatives, see @PieterGoosens' answer. If you asked this because you found the process of adding i18n to your theme ...



Top 50 recent answers are included