Tag Archives: TranslationReady

Translation ready

=================================================
=====> Add text domain in style.css:

Text Domain: themename
=================================================

1) Syntex:

_e( ‘text’, ‘textdomain’ );
========================================================

2) Titles (archive,tags,author,etc):

_e(‘Archives’,’generator’); echo “: “. get_the_date(‘M-Y’);
=====================================================
3) Buttons:

<div class=’btn-save’><input type=’submit’ class=’button-primary’ value='<?php _e(‘Save Options’,’generator’) ?>’ />
============================================================

4) URL:

<div class=”explain”><?php _e(‘Dribbble profile or page URL i.e.’,’generator’) ?> https://dribbble.com/username/</div&gt;
===============================================================

5) If alredy start php tag:

echo ($medium_options[‘scmessage’])? ‘<h6>’.esc_attr($medium_options[‘scmessage’]).'</h6>’ : ‘<h6>’.__(‘Connect With Me’,’medium’).'</h6>’;
==========================================================

6) In Array :

array(‘name’ => __(‘Faster Pagination’,’generator’))
============================================================

7) Bredcums:

printf(__(‘<a href=”%1$s”>%2$s</a>%3$s’,’multishop’),get_year_link(get_the_time(‘Y’)),get_the_time(‘Y’),$multishop_delimiter);
====REPLACE WITH BELLOW line=====
echo ‘<a href=”‘.get_year_link(get_the_time(‘Y’)).'”>’.get_the_time(‘Y’).'</a>’.$multishop_delimiter;
*********************************************************************

printf(__(‘%1$s %2$s %3$s’,’multishop’), $multishop_before, get_the_time(‘F’), $multishop_after);
====REPLACE WITH BELLOW line=====
echo  $multishop_before. get_the_time(‘F’). $multishop_after;
==============================================================

8) Entry meta:

$multishop_category_list = get_the_category_list( __( ‘, ‘, ‘multishop’ ) );
====REPLACE WITH BELLOW line=====
$multishop_category_list = get_the_category_list( ‘, ‘, ‘multishop’);
************************************************************************

$medium_category_list = _e(‘Posted in ‘,’booster’); echo “: “.get_the_category_list(‘, ‘);
$medium_tag_list = _e(‘ Tags’,’booster’); echo “: “.get_the_tag_list(”,’,’);
************************************************************************

$medium_category_list = _e(‘Posted in ‘,’booster’); echo “: “.get_the_category_list(‘, ‘);
$medium_tag_list = _e(‘ Tags’,’booster’); echo “: “.get_the_tag_list(”,’,’);
$besty_tag_list = get_the_tag_list() ? ‘<li>’.__(‘ Tags ‘,’besty’).’: ‘ .get_the_tag_list(”,’, ‘).'</li>’ : ”;
$besty_author = sprintf( ‘<li>’.__(‘Post By’,’besty’).’ : <a href=”%1$s” title=”%2$s” >%3$s</a></li>’,
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
esc_attr( sprintf( __( ‘View all posts by %s’, ‘besty’ ), get_the_author() ) ),
get_the_author()
);
**************************************************************************

$medium_category_list = get_the_category_list() ? sprintf( ‘<li> ‘.__(‘Posted in’,’medium’).
‘ : ‘.get_the_category_list( __( ‘, ‘, ‘medium’ ) ).’  </li>’) :”;
$medium_tag_list = get_the_tag_list() ? sprintf( ‘<li>’.__(‘Tags’,’medium’).’: %1$s </li>’, get_the_tag_list( ”, __( ‘, ‘, ‘medium’ ) )):”;
====REPLACE WITH BELLOW LINE=====
$medium_category_list = “”;
if(!empty(get_the_category_list()))
$medium_category_list = sprintf( ‘<li> ‘.__(‘Posted in’,’medium’).’ : ‘.get_the_category_list( __( ‘,’, ‘medium’ ) ).’  </li>’);
$medium_tag_list = “”;
if(!empty(get_the_tag_list()))
$medium_tag_list = sprintf( ‘<li>’.__(‘Tags’,’medium’).’: %1$s </li>’, get_the_tag_list( ”, __( ‘, ‘, ‘medium’ ) ));

================================================================
8) pagignation:

<div class=”col-md-12 medium-pagination-single”>
<span class=”medium-previous-link”><?php previous_post_link(__(‘%link’,’Previous’,’medium’)); ?></span>
<span class=”medium-next-link”><?php next_post_link(__(‘%link’,’Next’,’medium’)); ?></span>
</div>
***************************************************************************

<li><?php previous_posts_link(‘« ‘.__(‘Previous Page’,’a1′)); ?></li>
<li><?php next_posts_link( __(‘Next Page’,’a1′).’ »’, $a1_portfolio->max_num_pages ); ?></li>
===================================================================
FILES
====================================================================

1) comments.php

printf( _n( ‘One thought on – %2$s’, ‘%1$s thoughts on – %2$s’, get_comments_number(), ‘mywiki’ ),
******************************************************************************

printf( ‘<div class=”comment-metadata”><span>Post author %1$s</span>’,get_comment_author_link(),( $comment->user_id === $post->post_author ) ? ‘<span>’ . __( ‘Post author ‘, ‘besty’ ) . ‘</span>’ : ”);
echo ‘<span>’.get_comment_date(‘F j, Y’).'<span>’;
echo comment_reply_link( array_merge( $args, array( ‘reply_text’ => __( ‘Reply’, ‘besty’ ), ‘after’ => ”, ‘depth’ => $depth, ‘max_depth’ => $args[‘max_depth’] ) )).'</div>’;

====REPLACE WITH BELLOW line=====

<div class=”comment-metadata”>
<span><?php _e(‘Post author’,’besty’)?><span><?php echo ‘ : ‘.get_comment_author_link($comment->user_id === $post->post_author). ‘ ‘.get_comment_date(‘F j, Y’)  ?>
</div>
===========================================================
2) footer.php

printf( __( ‘Powered by %1$s and %2$s.’, ‘generator’ ), ‘<a href=”http://wordpress.org&#8221; target=”_blank”>WordPress</a>’,
‘<a href=”http://fasterthemes.com/wordpress-themes/generator&#8221; target=”_blank”>Generator</a>’ );
===========================================================

3) class-tgm-plugin-activation.php
(line near 642)
public function no_items()
{
_e(‘No plugins to install or activate’,’a1′); echo “.<a href=’admin_url()’>”.__(‘Return to the Dashboard’,’a1′).”</a>”;
echo ‘<style type=”text/css”>#adminmenu .wp-submenu li.current { display: none !important; }</style>’;
}
*******************************************************************

(line near 966)
$this->strings[‘downloading_package’] = printf( __(‘Downloading install package from %1$s %s %1$s’, ‘generator’),
‘<span class=”code”>’, ‘</span>…’);

(line near 1052) (remove strong tag)
$this->upgrader->strings[‘skin_update_failed_error’]  = __( ‘An error occurred while installing %1$s: %2$s’, ‘besty’ );
*********************************************************************

if ( is_wp_error( $activate ) ) {
printf(__(‘<div id=”message” class=”error”><p>%1$s</p></div>’,’multishop’),$activate->get_error_message());
printf(__(‘<p><a href=”%1$s” title=”%2$s” target=”_parent”>%2$s</a></p>’,’multishop’),
add_query_arg( ‘page’, $this->menu, admin_url( ‘themes.php’ ) ), esc_attr( $this->strings[‘return’] ), $this->strings[‘return’]);
return true; // End it here if there is an error with automatic activation
}
====REPLACE WITH BELLOW FUNCTION=====
if ( is_wp_error( $activate ) ) {
echo ‘<div id=”message” class=”error”><p>’ . $activate->get_error_message() . ‘</p></div>’;
echo ‘<p><a href=”‘ . add_query_arg( ‘page’, $this->menu, admin_url( ‘themes.php’ ) ) .
‘” title=”‘ . esc_attr( $this->strings[‘return’] ) . ‘” target=”_parent”>’ . $this->strings[‘return’] . ‘</a></p>’;

return true; // End it here if there is an error with automatic activation
}
************************************************************************

(line near 249)
printf(__(‘<p><a href=”%1$s” title=”%2$s” target=”_parent”>%3$s</a></p>’,’multishop’),
add_query_arg( ‘page’, $this->menu, admin_url( ‘themes.php’ ) ),esc_attr( $this->strings[‘return’] ), $this->strings[‘return’]);

====REPLACE WITH BELLOW LINE=====

echo ‘<p><a href=”‘ . add_query_arg( ‘page’, $this->menu, admin_url( ‘themes.php’ ) ) .
‘” title=”‘ . esc_attr( $this->strings[‘return’] ) . ‘” target=”_parent”>’ . $this->strings[‘return’] . ‘</a></p>’;
================================================================

4) themedefault-setup.php
if ( $multishop_tag_list ) {
$multishop_utility_text = __( ‘<div class=”multishop-entry-meta”> Posted in : %1$s  on %3$s by : %4$s </div>’, ‘multishop’ );
} elseif ( $multishop_category_list ) {
$multishop_utility_text = __( ‘<div class=”multishop-entry-meta”> Posted in : %1$s  on %3$s by : %4$s </div>’, ‘multishop’ );
} else {
$multishop_utility_text = __( ‘<div class=”multishop-entry-meta”> Posted on : %3$s by : %4$s </div>’, ‘multishop’ );
}
====REPLACE WITH BELLOW FUNCTION=====
if ( $multishop_tag_list ) {
$multishop_utility_text = __( ‘Posted in : %1$s  on %3$s by : %4$s’, ‘multishop’ );
} elseif ( $multishop_category_list ) {
$multishop_utility_text = __( ‘Posted in : %1$s  on %3$s by : %4$s’, ‘multishop’ );
} else {
$multishop_utility_text = __( ‘Posted on : %3$s by : %4$s’, ‘multishop’ );
}
====== with comment ==============
if ( $foodrecipes_tag_list ) {
$foodrecipes_utility_text = __( ‘Posted in : %1$s  on %3$s by : %4$s’, ‘foodrecipes’ );
echo __(‘Comments’,’foodrecipes’). ‘ : ‘ .get_comments_number().’ ‘;
} elseif ( $foodrecipes_category_list ) {
$foodrecipes_utility_text = __( ‘Posted in : %1$s  on %3$s by : %4$s’, ‘foodrecipes’ );
echo __(‘Comments’,’foodrecipes’). ‘ : ‘ .get_comments_number().’ ‘;
} else {
$foodrecipes_utility_text = __( ‘Posted on : %3$s by : %4$s’, ‘foodrecipes’ );
echo __(‘Comments’,’foodrecipes’). ‘ : ‘ .get_comments_number().’ ‘;
}
======= with icon class ===============
if ( $top_mag_tag_list ) {
$top_mag_utility_text = ‘<span><i class=”fa fa-folder-open”></i></span>’.__( ‘ %1$s ‘, ‘top-mag’ ).’&nbsp ‘.'<span><i class=”fa fa-user”></i></span>’.__( ‘ %4$s ‘, ‘top-mag’ ).’ ‘;
echo ‘<span><i class=”fa fa-comments-o”></i> ‘.get_comments_number().’&nbsp &nbsp’;
} elseif ( $top_mag_category_list ) {
$top_mag_utility_text = ‘<span><i class=”fa fa-folder-open”></i></span>’.__( ‘ %1$s ‘, ‘top-mag’ ).’&nbsp ‘.'<span><i class=”fa fa-user”></i></span>’.__( ‘ %4$s ‘, ‘top-mag’ ).’ ‘;
echo ‘<span><i class=”fa fa-comments-o”></i> ‘.get_comments_number().’&nbsp &nbsp’;
} else {
$top_mag_utility_text = ‘<span><i class=”fa fa-folder-open”></i></span>’.__( ‘ %1$s ‘, ‘top-mag’ ).’&nbsp ‘.'<span><i class=”fa fa-user”></i></span>’.__( ‘ %4$s ‘, ‘top-mag’ ).’ ‘;
echo ‘<span><i class=”fa fa-comments-o”></i> ‘.get_comments_number().’&nbsp &nbsp’;
}

========= date =======================
<?php echo get_comment_date(‘M j, Y \a\t g:i a’); ?>

=====================================
5) archive.php
if ( is_day() ) :
printf( __( ‘Daily Archives : %s’, ‘medium’ ), get_the_date() );
elseif ( is_month() ) :
printf( __( ‘Monthly Archives : %s’, ‘medium’ ), get_the_date( _x( ‘F Y’, ‘monthly archives date format’, ‘medium’ ) ) );
elseif ( is_year() ) :
printf( __( ‘Yearly Archives : %s’, ‘medium’ ), get_the_date( _x( ‘Y’, ‘yearly archives date format’, ‘medium’ ) ) );
else :
_e( ‘Archives’, ‘medium’ );
endif;
====REPLACE WITH BELLOW FUNCTION=====
if ( is_day() ) :
_e(‘Daily Archives’,’medium’); echo “: “. get_the_date();
elseif ( is_month() ) :
_e(‘Monthly Archives’,’medium’); echo “: “. get_the_date(‘F-Y’);
elseif ( is_year() ) :
_e(‘Yearly Archives’,’medium’); echo “: “. get_the_date(‘Y’);
else :
_e( ‘Archives’, ‘medium’ );
endif;

%d bloggers like this: