I want to know if I can change some language itens text
like:
READ MORE
Leave a Reply?
Can I Change this to my language (Portuguese)?
thanks a lot!
(14 posts)
(6 voices)
I want to know if I can change some language itens text
like:
READ MORE
Leave a Reply?
Can I Change this to my language (Portuguese)?
thanks a lot!
Hello fabriciosthel,
It would be best to use a plugin such as QTranslate or WPML to translate your site from one language to another. If you still wish to translate your items manually then if possible send us a link to your page or take a screenshot and highlight which areas you wish to translate and we will point you in the right direction.
Hey Fabriciosthel,
To translate the theme, here are the pieces that need changing:
MAKE CHANGES AT YOUR OWN RISK!!!!!!!!!!!!!!
Full Portfolio
In lib/includes/template-portfolio-full.php
Line 243:
<a>"><span>Read More</span></a>
Change Read more to language of choice.
Line 247:
<a>"><span>Visit Site</span></a>
Change Visit Site to language of choice
Gallery Portfolio
In lib/includes/template-portfolio-gallery.php
Line 236:
<span><a>"><span>Read More</span></a></span>
Change Read More to language of choice
Line 240:
<span><a>"><span>Visit Site</span></a></span>
Change Visit Site to language of choice
Custom Feature
In lib/includes/featured-custom.php
(If I understand this is for the slider)
Line 64:
<a>" class="button">Read More</a>
Change Read More to language of choice
Line 144 (Not sure if needs changing):
<?php the_content("<span>Read More</span>",false);
Blog
In lib/includes/template-blog.php
Line 209:
<a>"><span>Read More</span></a>
Change Read More to language of choice
Line 220:
<p>Sorry, that document can not be found.</p>
Change to language of choice.
Contact Form
In lib/includes/submit.php and lib/includes/submit-widget.php
Line 13:
$nameError = 'You forgot to enter your name.';
Change "You forgot to enter your name." to language of choice.
Line 21:
$emailError = 'You forgot to enter your email address.';
Change "You forgot to enter your email address." to language of choice.
Line 24:
$emailError = 'You entered an invalid email address.';
Change "You entered an invalid email address." to language of choice.
Line 32:
$commentError = 'You forgot to enter your comments.';
Change "You forgot to enter your comments" to language of choice.
Sitemap
In lib/includes/sitemap-content.php
Line 1:
<h2>Pages</h2>
Change "Pages" to language of choice
Line 3:
<div class="divider top"><a href="#">Top</a></div>
Change "Top" to language of choice.
Line 7:
<h2>Feeds</h2>
Change "Feeds" to language of choice.
Line 9:
<li><a title="Full content">">Main RSS</a></li>
Change "Main RSS" and "Full Content" to language of choice.
Line 10:
<li><a title="Comment Feed">">Comment Feed</a></li>
Change both "Comment Feed"'s to language of choice
Line 12:
<div class="divider top"><a href="#">Top</a></div>
Change "Top" to language of choice.
Line 16:
<h2>Categories</h2>
Change "Categories" to language of choice.
Line 18:
<div class="divider top"><a href="#">Top</a></div>
Change "Top" to language of choice.
Line 22:
<h2>All internal blog posts:</h2>
Change "All internal blog posts" to language of choice.
Line 23:
[+/-] Get all posts </p>
Change "Get all posts" to language of choice
Line 34:
<div class="divider top"><a href="#">Top</a></div>
Change "Top" to language of choice
Line 38:
<h2>Archives</h2>
Change "Archives" to language of choice.
Line 43:
<div class="divider top"><a href="#">Top</a></div>
Change "Top" to language of choice.
Comments
In /comments.php
Line 4:
die ('Please do not load this page directly. Thanks!');
Change "Please do not load this page directly. Thanks!" to language of your choice.
Line 7:
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
Change "This post is password protected. Enter the password to view comments." to language of choice.
Line 27:
<em class="awaiting_moderation"><?php _e('Your comment is awaiting moderation.') ?>
Change "Your comment is awaiting moderation" to language of choice.
Line 33:
<?php edit_comment_link(__('(edit)'),' ','') ?>
Change "edit" which is inside ('( and )') to language of choice.
Line 37:
<?php comment_reply_link(array_merge( $args, array('reply_text' => '(reply)', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
Change "reply" withing '( and )' to language of choice.
Line 47:
<?php comments_number('No Comments', 'One Comment', '% Comments' ); ?>
Change "No comments", "One Comment" and "Comments" to language of choice.
Line 66:
if ( is_single() ){ echo"<p>Comments are closed on this post.</p>"; }
Change "Comments are closed on this post" to language of choice.
Line 75:
<h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
Change "Leave a Reply" and "Leave a Reply to" to language of choice.
Line 81:
<p>You must be <a>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
Change "You must be", "logged in" and "to post a comment." to the language of your choice.
Line 89:
<p class="logged">Logged in as <a>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a>" title="Log out of this account">Log out »</a></p>
Change "Logged in as", "Log out of this account" and "Log out" to language of choice.
Line 93:
<p><input type="text" class="textfield" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /><label class="textfield_label" for="author">Name *</label></p>
Change "Name" to language of choice.
Line 95:
<p><input type="text" class="textfield" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /><label class="textfield_label" for="email">Email *</label></p>
Change "Email" (the one with * next to it) to language of choice. Do not change name="email".
Line 97:
<p><input type="text" class="textfield" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /><label class="textfield_label" for="url">Website</label></p>
Change "Website" to language of choice.
Full Template
In /template-full.php
Line 80:
<?php wp_link_pages('before=<div id="page-links">Pages: &after=</div>'); ?>
Change "Pages:" to language of choice.
Sitemap Template
In /template-sitemap.php
Line 82:
<?php wp_link_pages('before=<div id="page-links">Pages: &after=</div>'); ?>
Change "Pages:" to language of choice.
Search Form
In /searchform.php
Line 3:
Can't put this here as it get's blocked. View code, contact with questions.
Change "Search…", "Search…" and "Search…" to language of choice.
Search Results
In /search.php
Line 99:
<div id="intro_blurb_title"><span>Search</span></div>
Change "Search" to language of choice.
Line 105:
Search Results for: ‘<?php the_search_query() ?>’
Change "Search Results" and "for:" to language of choice.
Line 126:
<h1>Search Results for: ‘<?php the_search_query() ?>’</h1>
Change "Search Results" and "for:" to language of choice.
Line 139:
Posted <a>"><?php the_time('M') ?> <?php the_time('j') ?>, <?php the_time('Y') ?></a> by <?php the_author_posts_link(); ?></span>
Change "Posted" and "by" to language of choice.
Line 141:
in <?php the_category(', ') ?>
Change "in" to language of choice.
Line 143:
with <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?>
Change "with", "Comments", "Comments" and "Comments" to language of choice.
Line 168:
<a>"><span>Read More</span></a>
Change "Read More" to language of choice.
Line 179:
<p>Sorry, no posts matched your criteria.</p>
Change "Sorry, no posts matched your criteria" to language of choice.
Page
In /page.php
Line 84:
<?php wp_link_pages('before=<div id="page-links">Pages: &after=</div>'); ?>
Change "Pages:" to language of choice.
Header
In /header.php
Line 90:
<li <?php if (is_front_page()){echo 'class="current_page_item"';} ?> ><a>">Home</a>
Change "Home" (the last one) to language of your choice.
Footer
In /footer.php
Line 14:
<h3 class="widgettitle">Recent</h3>
Change "Recent" to language of your choice.
Line 29:
<h3 class="widgettitle">Archives</h3>
Change "Archives" to language of choice.
Line 42:
<h3 class="widgettitle">Meta</h3>
Change "Meta" to language of your choice.
Line 44:
<li><a href="#">Log in</a></li>
Change "Log in" to language of your choice.
Line 45:
<li><a title="Syndicate this site using RSS 2.0" href="#">Entries <abbr title="Really Simple Syndication">RSS</abbr></a></li>
Change "Syndicate this site using RSS 2.0", "Entries" and "Really Simple Syndication" to language of your choice.
Line 46:
<li><a title="The latest comments to all posts in RSS" href="#">Comments <abbr title="Really Simple Syndication">RSS</abbr></a></li>
Change "The latest comments to all posts in", "Comments" and "Really Simple Syndication" to language of your choice.
Line 47:
<li><a title="Powered by WordPress, state-of-the-art semantic personal publishing platform." href="#">WordPress.org</a></li>
Change "Powered by Wordpress, state-of-the-art semantic personal publishing platform." to language of your choice.
Line 55:
<h3 class="widgettitle">Categories</h3>
Change "Categories" to language of your choice.
Archive
In /archive.php
Line 104:
<div id="intro_blurb_title"><span>Archives</span></div>
Change "Archives to language of your choice.
Line 109 & 147:
Category Archivefor: ‘<?php single_cat_title(); ?>’
Change "Category Archive" to language of your choice.
Line 111 & 149:
All Posts TaggedTag: ‘<?php single_tag_title(); ?>’
Change "All Posts Tagged" to language of your choice.
Line 113 & 151:
Daily Archivefor: ‘<?php the_time('F jS, Y'); ?>’
Change "Daily Archive" to language of your choice.
Line 115 & 153:
Monthly Archivefor: ‘<?php the_time('F, Y'); ?>’
Change "Monthly Archive" to language of your choice.
Line 117 & 155:
Yearly Archivefor: ‘<?php the_time('Y'); ?>’
Change "Yearly Archive" to language of your choice.
Line 120 & 158:
Author Archivefor: ‘<?php echo $curauth->nickname; ?>’
Change "Author Archive" to language of your choice.
Line 122 & 160:
Blog Archives
Change "Blog Archives" to language of your choice.
Line 171:
<h2 class="blog_header"><a>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
Change "Permanent Link:" to language of your choice.
Line 175:
Posted <a>"><?php the_time('M j Y') ?></a> by <?php the_author_posts_link(); ?>
Change "Posted" and "by" to the language of your choice.
Line 177:
in <?php the_category(', ') ?>
Change "in" to the language of your choice.
Line 179:
with <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?>
Change "with", "Comments", "Comment" and "Comments" to the language of your choice.
Line 204:
<a>"><span>Read More</span></a>
Change "Read More" to the language of your choice.
404 Error
In /404.php
Line 14:
<div id="intro_blurb_title"><span>404 - Not Found</span></div>
Change "Not Found" to language of your choice.
Line 16:
Looks like the page you're looking for isn't here anymore. Try using the search box or sitemap below.
Change "Looks like the page you're looking for isn't here anymore. Try using the search box or sitemap below" to the language of your choice.
Line 36:
<h1>404 - Not Found</h1>
Change "Not Found" to the language of your choice.
Line 41:
<h5>Looks like the page you're looking for isn't here anymore. Try using the search box or sitemap below.</h5>
Change "Looks like the page you're looking for isn't here anymore. Try using the search box or sitemap below" to the language of your choice.
Thanks for this R4z3r, it will be a great resource to people wanting to translate stuff manually.
Added to tutorials.
Thats fantastic! Thanks R4z3r.
I'm still getting Dates on the recent posts on the Homepage appearing in English.
Anyone know where to change that?
Hello breezemaster,
Are you using a special template file found on this forum? If possible then send us a link to your homepage so we can take a closer look. Or you can take a screenshot and highlight the areas you are having trouble with.
I'm afraid there are far more places to make changes...
Dates are particularly tricky; it's not the author's fault that they never trust users to get the site owners to properly configure them correctly in the standard way (i.e. WP's admin interface) and thus most templates I've come across usually "force" American dates and completely ignore what WP tells them.
The proper way of doing it is to painfully go through all template files, look for the_time() or similar functions, and replace them with the new 3.0 function:echo get_the_date(); which should work fine. An alternative is to use echo date_i18n(); for full internationalization support but I never tried it out.
As for more changes on other files, here they go:
Featured categories
In lib/includes/featured-categories.php
Line 36:
<a>" class="button">Read More</a>
Change "Read More" to the language of your choice.
Submit widget
In lib/includes/submit-widget.php
There are more translations in the subject/headers of the emails to be sent on lines 46-55 (similar to what is described below for submit.php)
Submit
in lib/include/submit.php
Line 13:
$nameError = 'You forgot to enter your name.';
Change "You forgot to enter your name." to the language of your choice.
Line 21:
$emailError = 'You forgot to enter your email address.';
Change "You forgot to enter your email address." to the language of your choice.
Line 24:
$emailError = 'You entered an invalid email address.';
Change "You entered an invalid email address." to the language of your choice.
Line 32:
$commentError = 'You forgot to enter your comments.';
Change "You forgot to enter your comments." to the language of your choice.
Lines 43-57:
$emailTo = $_POST['emailAddress']; $subject = 'Contact Form Submission from '.$name; $sendCopy = trim($_POST['sendCopy']); $body = "Name: $name \n\nEmail: $email \n\nComments: $comments"; $headers = 'From: My Site <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; mail($emailTo, $subject, $body, $headers); if($sendCopy == true) { $subject = 'You emailed Your Name'; $headers = 'From: Your Name <noreply@somedomain.com>'; mail($email, $subject, $body, $headers); }
Change "Contact Form Submission from", "Name", "Email", "Comments", "My Site", "You emailed Your Name", "Your Name <noreply@somedomain.com>" but do not change "From:" because that's a reserved word for mail to work!!
Comment to the authors: I believe that the code here is incomplete; surely some of that data could be retrieved automatically from the WP database or the form post fields? I haven't checked it though
Blog template
In lib/includes/template-blog.php
Lines 110 and 126:
echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.';
Replace the text with your translation. (Note: since I'm not using Twitter or any of the Twitter support on several areas of this theme, I very likely have missed lots of Twitter-related texts which require further translation)
Lines 180-184:
Posted <a>"><?php the_time('M j Y') ?></a> by <?php the_author_posts_link(); ?> <?php if ( count(($categories=get_the_category())) > 1 || $categories[0]->cat_ID != 1 ) : ?> in <?php the_category(', ') ?> <?php endif; ?> with <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?>
Change "Posted", "by", "in", "with" and "0 Comments', '1 Comment', '% Comments" with the translated text of your choice. To fix the "American" dates, replace the_time('M j Y') with echo $get_the_date();
Full Portfolio
In lib/includes/template-portfolio-full.php
Lines 130 and 146:
echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.';
Translate the text between the quotes.
Gallery Portfolio
In lib/includes/template-portfolio-gallery.php
Lines 129 and 145:
echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.';
Translate the text between the quotes.
Single Portfolio
In lib/includes/template-portfolio-single.php
Lines 115 and 131:
echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.';
Translate the text between the quotes.
Line 182:
<?php wp_link_pages('before=<div id="page-links">Pages: &after=</div>'); ?>
Replace "Pages:" with the translation of your choice.
Single Template
In lib/includes/template-single.php
Lines 129 and 145:
echo 'You must have your Twitter user name entered in the "General Settings" tab of your themes options for this to function properly.';
Translate the text between the quotes.
Lines 178-183:
<?php $get_year = get_the_time('Y'); $get_month = get_the_time('m'); ?> Posted <a>"><?php the_time('M j Y') ?></a> by <?php the_author_posts_link(); ?> <?php if ( count(($categories=get_the_category())) > 1 || $categories[0]->cat_ID != 1 ) : ?> in <?php the_category(', ') ?> <?php endif; ?> with <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?>
Change "Posted", "by", "in", "with" and "0 Comments', '1 Comment', '% Comments" with the translated text of your choice. To fix the "American" dates, replace the_time('M j Y') with echo $get_the_date();
Line 213:
<?php wp_link_pages('before=<div id="page-links">Pages: &after=</div>'); ?>
Change "Pages:" to the language of your choice.
Line 217
<?php the_tags('<strong>Tags</strong>: <em>', '</em>, <em>', '</em>'); ?>
Change "Tags" to the language of your choice.
Line 220:
<strong>Category:</strong>
Change "Category" to the language of your choice.
Line 223:
<?php edit_post_link('Edit', ' ( ', ' ) '); ?>
Change "Edit" to the language of your choice.
Line 258:
<p>Sorry, no posts matched your criteria.</p>
Translate the text between the paragraph tags.
Posts
In lib/functions/posts.php
Line 53:
<h3>Recent Posts</h3>
Change "Recent Posts" to your language of choice.
Line 58:
mysql2date('F j, Y', $post_date, false);
You might wish to change "F j, Y" to reflect a non-American date format (e.g. Y-m-d for the international date format)
Line 91:
<h3>Popular Posts</h3>
Change "Popular Posts" to your language of choice.
Theme functions
In lib/functions/theme-functions.php
Line 91:
$out .= '<p class="thanks"><strong>Thanks!</strong> Your email was successfully sent.</p>';
Change "Thanks!" and "Your email was successfully sent." by the translation of your choice (mind the space before the second sentence!)
Line 97:
$out .= '<p class="error">There was an error submitting the form.<p>';
Translate "There was an error submitting the form." to your language of choice.
Line 114:
$out .= ' size="22" tabindex="1" /><label class="textfield_label" for="contactName">Name *</label></p>';
Change "Name *" to your language of choice (keep the asterisk where it is!)
Line 128:
$out .= ' size="22" tabindex="2" /><label class="textfield_label" for="email">Email *</label></p>';
Change "Email *" to your language of choice (keep the asterisk where it is!)
Line 146:
$out .= '<p class="screenReader"><label for="checking" class="screenReader">If you want to submit this form, do not enter anything in this field</label><input type="text" name="checking" id="checking" class="screenReader" value="';
Change "If you want to submit this form, do not enter anything in this field" to your language of choice.
Line 154:
$out .= '<p><input name="submittedContact" id="submittedContact" class="button" tabindex="4" value="Submit" type="submit" /></p>';
The "Submit" in value="Submit" can be changed to the language of choice (don't touch the other one!).
<p>Twitter</p>
In lib/functions/twitter.php
Line 60:
echo '<p>RSS not configured</p>';
Change "RSS not configured" to your language of choice.
Line 63:
echo '<p>No public Twitter messages.</p>';
Change "
No public Twitter messages." to your language of choice.
Widgets
In lib/functions/widgets.php
Line 15:
<h3 class="widgettitle">Photos on <span>flick<span>r</span></span></h3>
Change "Photos on" to your language of choice.
Line 63:
echo $args['before_title'] .'Recent Tweets'. $args['after_title'];
Change "Recent Tweets" to your language of choice.
Line 79:
echo '<p>You must have your Twitter user name entered in the "General Settings" tab of your themes options for this widget to function properly.</p>';
Translate the text between the paragraph tags to your language of choice.
Line 122:
echo $args['before_title'] .'Popular Posts'. $args['after_title'];
Translate "Popular Posts" to your language of choice.
Line 130:
$post_date = mysql2date('F j, Y', $post_date, false);
Might require changing "F j, Y" to a non-American date format (e.g. "Y-m-d" for the international date format)
Line 167:
echo $args['before_title'] .'Recent Posts'. $args['after_title'];
Change "Recent Posts" to your language of choice.
Line 175:
$post_date = mysql2date('F j, Y', $post_date, false);
Might require changing "F j, Y" to a non-American date format (e.g. "Y-m-d" for the international date format)
Line 209:
$settings['title'] = 'Contact Info';
Change "Contact Info" to your language of choice.
Line 303:
echo $args['before_title'] .'Email Us'. $args['after_title'];
Change "Email Us" to your language of choice.
Line 313:
<p class="thanks"><strong>Thanks!</strong> Your email was successfully sent.</p>
Change "Thanks!" and "Your email was successfully sent." by the translation of your choice (mind the space before the second sentence!)
Line 319:
<p class="error">There was an error submitting the form.<p>
Translate "There was an error submitting the form." to your language of choice.
Line 323:
<p><input type="text" name="contactNameWidget" id="contactNameWidget" value="<?php if(isset($_POST['contactNameWidget'])) echo $_POST['contactNameWidget'];?>" class="requiredField textfield<?php if($nameError != '') {echo ' inputError';} ?>" size="22" tabindex="5" /><label class="textfield_label" for="contactNameWidget">Name *</label></p>
Change "Name" to your language of choice.
Line 325:
<p><input type="text" name="emailWidget" id="emailWidget" value="<?php if(isset($_POST['emailWidget'])) echo $_POST['emailWidget'];?>" class="requiredField email textfield<?php if($emailError != '') {echo ' inputError';} ?>" size="22" tabindex="6" /><label class="textfield_label" for="emailWidget">Email *</label></p>
Change "Email *" to your language of choice (keep the asterisk!).
Line 329:
<p class="screenReader"><label for="checkingWidget" class="screenReader">If you want to submit this form, do not enter anything in this field</label><input type="text" name="checkingWidget" id="checkingWidget" class="screenReader" value="<?php if(isset($_POST['checking'])) echo $_POST['checking'];?>" /></p>
Change "If you want to submit this form, do not enter anything in this field" to your language of choice.
Line 333:
<p><input name="submittedWidget" id="submittedWidget" class="button<?php if($args['name'] != "Sidebar"){echo ' in_footer';} ?>" tabindex="8" value="Submit" type="submit" /></p>
The "Submit" in value="Submit" can be changed to the language of choice (don't touch the other one!).
(There are a few more things on widgets.php, but they should only appear on the admin panel and not on the public site, so I've skipped them)
---
I would like to suggest the authors of this fabulous theme to start using a simple way of dealing with internationalization issues. Most themes already support this technique, and it allows theme customers to simply create the appropriate .po files and immediately support multiple languages. I've seen on other threads how people are successfully implementing WPML with the inFocus template. I love WPML, and use it on some multilingual, but I hardly understand how they managed to get it working so well without .po file support!
Note that the biggest issue for me right now is fearing that an upgrade to fix a critical error or a serious security bug will require overwriting all inFocus templates (which is what will happen during an upgrade), and I'll have to painfully make all changes manually again. With .po file support, this would not be the case: the worst-case scenario would just require to update the .po file if new strings to be translated popped up.
This should be a feature request :) which I promise to do on a separate thread!
Hello Gwyneth Llewelyn,
Thanks for the help! We have noticed this and we are doing changes in our new framework such as adding __(), _e() tags around all text. This should allow texts to be read by a .po editor for easy translation.
Let us know if you see any other areas we can improve on.
Yay Elliott! This pretty much makes my feature request obsolete.
Great work, I'll be really looking forward to that!
I think it was relocated with the last update wasn't it? I need to change only a few items to my language (dutch) but i can't find the template-portfolio-full.php file, nor can i find the includes map. Am i missing files? (doubt it though since it works perfectly) or was it relocated?
thanks in advance,
robin
Hello VivalaMedia,
Go ahead and use our .pot file as it's a lot easier, http://mysitemyway.com/docs/index.php/Translating_your_site.
I followed the tutorial, did everything exactly as it said. But nothing changes when i upload the .mo file in the language folder. What is the reason this problem might occur?
thanks in advance,
Robin
You made sure to change your Wordpress language? http://mysitemyway.com/docs/index.php/Translating_your_site#Setting_the_default_language_for_Wordpress
And did you upload it in the correct area? http://mysitemyway.com/docs/index.php/Translating_your_site#Uploading_the_.mo_file
Please read the instructions carefully.
You must log in to post.