![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I have translated all the dafault strings of my Lifestyle theme with poedit. I just want to know which name I have to give to the two file .po and .mo Is it right it_IT.po (.mo) or it.po(.mo) or default.po(.mo)? I tried to upload each of those files but I don't see the italian translation of the strings. Tnx in advance
www.charliegolf.it/home
__________________
Caroliolus Genuensis - Comensis medicus in urgenti et salae medicamentariae chirurgia versatus |
|
#2
|
||||
|
||||
|
__________________
StudioPress on Facebook Copyblogger | StudioPress | ScribeSEO Teaching Sells | Third Tribe | Premise Follow me on Twitter |
|
#3
|
||||
|
||||
|
I have read the tips and I made everthing written in it but my theme still remains in English. I have the it_IT.mo &.po file in languages folder theme but nothing happens.
http://www.charliegolf.it/home
__________________
Caroliolus Genuensis - Comensis medicus in urgenti et salae medicamentariae chirurgia versatus |
|
#4
|
||||
|
||||
|
Looks like it is in Italian to me.
__________________
StudioPress on Facebook Copyblogger | StudioPress | ScribeSEO Teaching Sells | Third Tribe | Premise Follow me on Twitter |
|
#5
|
|||
|
|||
|
Actually I have the same problem with my Danish translation - my url is www.itsfashionbaby.dk
|
|
#6
|
||||
|
||||
|
To me it is not in Italian. just only the posts i wrote. Don't know. I think it's missing something because my question is: how the theme knows to keep the italian .mo instead the default theme of the lifestyle?
Tnx
__________________
Caroliolus Genuensis - Comensis medicus in urgenti et salae medicamentariae chirurgia versatus |
|
#7
|
||||
|
||||
|
Yes, you need to add all of the English words that are used within the theme, into your translation files. You can probably download one of the other 2 translation files & take a peek at what they did. You will see what words they translated from english to swedish for example.
__________________
StudioPress on Facebook Copyblogger | StudioPress | ScribeSEO Teaching Sells | Third Tribe | Premise Follow me on Twitter |
|
#8
|
|||
|
|||
|
Quote:
What am I doing wrong? Where can I download the translation files? |
|
#9
|
|||
|
|||
|
Did you create the .po and .mo files with Poedit and upload them to the lifestyle/languages directory?
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#10
|
|||
|
|||
|
Quote:
The only thing, I can think of, is that I wasn't sure what to name the file, - if it should be da_DK or da_DA - but I don't know, if that even matters? |
|
#11
|
|||
|
|||
|
File names should be da_DK.mo and da_DK.po
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#12
|
|||
|
|||
|
Quote:
I really cannot figure out, where it's gone wrong... |
|
#13
|
|||
|
|||
|
What's the location of the files?
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#14
|
|||
|
|||
|
Quote:
httpdocs is my root directory |
|
#15
|
||||
|
||||
|
Check the file permission settings for /languages
__________________
StudioPress on Facebook Copyblogger | StudioPress | ScribeSEO Teaching Sells | Third Tribe | Premise Follow me on Twitter |
|
#16
|
|||
|
|||
|
Quote:
|
|
#17
|
|||
|
|||
|
I've just realised you probably don't have the right code in the theme's functions.php. Add this below the opening <?php tag:
Code:
function test_localization( $locale ) {
return "da_DK";
}
add_filter('locale','test_localization');
load_theme_textdomain('studiopress', TEMPLATEPATH.'/languages/');
Don't forget, you also need to be running Wordpress in Danish if you want all Wordpress core stuff in Danish.
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#18
|
||||
|
||||
|
SOLVED!!!!!!!!!!!!!!!!!!!1
I noticed that all the strings should have this structure: Code:
<?php _e("ENGLISH string", 'studiopress'); ?>
Code:
__('English string', 'studiopress')
Code:
<?php _e("ENGLISH string"'); ?>
Code:
__('English string')
Code:
, 'studiopress' It is not use to put the other function
__________________
Caroliolus Genuensis - Comensis medicus in urgenti et salae medicamentariae chirurgia versatus |
|
#19
|
|||
|
|||
|
Quote:
in which file is this? |
|
#20
|
||||
|
||||
|
in all the template file header, comments and so on. Go to editor theme and check all the string missing the word studiopress
__________________
Caroliolus Genuensis - Comensis medicus in urgenti et salae medicamentariae chirurgia versatus |
|
#21
|
|||
|
|||
|
You're right - the texdomain name "studiopress" isn't in the code.
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#22
|
|||
|
|||
|
@ CHARLIEGOLF,
Can you post your functions.php file? I'm curious about something...
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#23
|
||||
|
||||
|
Code:
<?php
load_theme_textdomain('studiopress', TEMPLATEPATH.'/languages/');
add_filter('comments_template', 'legacy_comments');
function legacy_comments($file) {
if(!function_exists('wp_list_comments')) : // WP 2.7-only check
$file = TEMPLATEPATH . '/legacy.comments.php';
endif;
return $file;
}
// Turn a category ID to a Name
function cat_id_to_name($id) {
foreach((array)(get_categories()) as $category) {
if ($id == $category->cat_ID) { return $category->cat_name; break; }
}
}
// include the breadcrumb nav tool
include(TEMPLATEPATH."/tools/breadcrumbs.php");
// include the theme options
include(TEMPLATEPATH."/tools/theme-options.php");
if ( function_exists('register_sidebars') )
register_sidebar(array('name'=>'Sidebar Top',));
register_sidebar(array('name'=>'Sidebar Bottom Left',));
register_sidebar(array('name'=>'Sidebar Bottom Right',));
register_sidebar(array('name'=>'468x60 Header Banner',));
register_sidebar(array('name'=>'468x60 Post Banner',));
function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);
if (strlen($_GET['p']) > 0) {
echo "
";
echo $content;
echo "<a href='";
the_permalink();
echo "'>".__("Read More")." →</a>";
echo "</p>";
}
else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "
";
echo $content;
echo "...";
echo "<a href='";
the_permalink();
echo "'>".$more_link_text."</a>";
echo "</p>";
}
else {
echo "
";
echo $content;
echo "<a href='";
the_permalink();
echo "'>".__("Read More")." →</a>";
echo "</p>";
}
}
function sp_widget() {
require_once(ABSPATH.WPINC.'/rss.php');
if ( $rss = fetch_rss( 'http://feeds2.feedburner.com/studiopress' ) ) {
$content = '<div class="rss-widget>"';
$content .= '<p style="border-bottom: 1px solid #ccc; padding-bottom: 10px; font-weight: bold;"><a rel="nofollow" href="http://www.studiopress.com/themes/pro-plus">Upgrade now to the Pro Plus All-Theme package for only $140 --></a
(Use PPUPG as the discount code when you are on the shopping cart page.)</p>';
$content .= '<ul>';
foreach ( array_slice( $rss->items, 0, 5 ) as $item ) {
$content .= '[*]';
$content .= ''.htmlentities( $item['title'] ).'';
$content .= ' <span class="rss-date">'.date('F j, Y',strtotime($item['published'])).'</span>';
$content .= '<div class="rssSummary">'.htmlentities( $item['summary'] ).'</div>';
$content .= '';
}
$content .= '[/list]';
$content .= '<p style="border-top: 1px solid #ccc; padding-top: 10px; font-weight: bold;">
__________________
Caroliolus Genuensis - Comensis medicus in urgenti et salae medicamentariae chirurgia versatus |
|
#24
|
|||
|
|||
|
Thanks. :)
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#25
|
|||
|
|||
|
Quote:
Because in that case, it's not really internationalized... |
|
#26
|
|||
|
|||
|
Yes, that's the way to fix it and no, it's not fully internationalised*. I've alerted Brian so that he is aware of the issue.
* To be picky, it is internationalised but the textdomain name isn't in the code. Functions.php is also missing this code: Code:
load_theme_textdomain('studiopress', TEMPLATEPATH.'/languages/');
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#27
|
|||
|
|||
|
Quote:
Where should this code be added to the functions.php? And should I still add the other code, you told me previously? |
|
#28
|
|||
|
|||
|
Ignore the previous code I told you about (assuming you're not running a multilingual site) and add this just below the opening <?php tag at the top of the file:
Code:
load_theme_textdomain('studiopress', TEMPLATEPATH.'/languages/');
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#29
|
|||
|
|||
|
Thank you guys. I had the same problem in Spanish. Now almost everything run smooth.
BTW. Does any of you how to get the date in the head translated too? Is the only thing I couldn't... |
|
#30
|
|||
|
|||
|
Hi,
If you're running WP in Spanish the date should be in Spanish. Can you post your URL?
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#31
|
|||
|
|||
|
Hi Adew,
Actually, what I have seen is that the function date() is not part of Wordpress, but of PHP. So, if your server is running a PHP version in other language different than yours (well, if it is defined in config) and you do not have access to its configuration, you will have the date in the server's language. That is my problem right now. So, my solution for this have been this: In header.php, where it says: Code:
<?php echo date("l, F j, Y"); ?></p>
Code:
<script language="JavaScript" type="text/JavaScript">
dows = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
months = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
now = new Date();
dow = now.getDay();
d = now.getDate();
m = now.getMonth();
h = now.getTime();
y = now.getFullYear();
document.write(dows[dow]+", "+d+" de "+months[m]+" de "+y);
</script>
</p>
Antonio PD: I will post the URL as soon as the website is online, now I have running it in local (Xampp for Linux) |
|
#32
|
|||
|
|||
|
Good work, Antonio! You're absolutely right, of course, we're talking about a standard PHP function not a WP function. Your solution looks good to me. :)
Looking forward to seeing your site when it's up and running.
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#33
|
|||
|
|||
|
Just to thanks you guys, used all the stuff here and got my FR translation uploaded and working as well as changed the date!
I used that Spanish script and simply replace the days and months in FR of course, as well as the write format... Here it is for those who need it ready made: Code:
<script language="JavaScript" type="text/JavaScript">
dows = new Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
months = new Array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
now = new Date();
dow = now.getDay();
d = now.getDate();
m = now.getMonth();
h = now.getTime();
y = now.getFullYear();
document.write(dows[dow]+" "+d+" "+months[m]+" "+y);
</script>
</p>
On another note, shouldn't you create a repository folder where people could upload their .po and .mo files... Would be good me think... Vincent |
|
#34
|
|||
|
|||
|
Vincent,
Thanks for your post. I agree - a repository of translations would be an excellent idea, and I'll pass on your suggestion to Brian. :)
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#35
|
|||
|
|||
|
Talking about the date translated, just noticed that the coments left on a post are dated as well...
Where would be to file to modify that date format?? edit: same when you click on a category page for example, the posts are listed chronologically, but using English date ... |
|
#36
|
|||
|
|||
|
Quote:
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#37
|
|||
|
|||
|
Quote:
:)
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#38
|
|||
|
|||
|
Sorry for being a complete blonde - but I'm not completely sure where to add the missing 'studiopress' in the various files.
Could anyone please post a screendump? |
|
#39
|
||||
|
||||
|
The best thing to do would be to download the latest version from here as that has been updated with the correct localization code: viewtopic.php?f=8&t=2522
Quote:
|
|
#40
|
|||
|
|||
|
Thank you so much - everything is working perfectly now!
Quote:
|
|
#41
|
|||
|
|||
|
@ itsfashionbaby,
Glad to hear all is working now. :)
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#42
|
|||
|
|||
|
Hi, I haven't figured out a way to make the Lifestyle theme to display the date in the correct language. I am using the Spanish version of Wordpress, I have translated all of it with poedit (as suggested) and everything is fine except the upper left date stamp.
I can always delete it from the header but I guess it looks kinda' cool there. Is there any way I could have a quick answer about this? Thanks! Edit: Oh, and I am using the current version (4.0) of the theme. |
|
#43
|
|||
|
|||
|
Hi,
If your server is running PHP in Spanish, these dates will be translated automatically.
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Translation Problem | jon513 | General Discussion | 3 | 12-20-2009 03:38 PM |
| Use Italian translation as base for Dutch one? | Reishonger | General Discussion | 6 | 09-02-2009 11:52 AM |
| Help for italian language translation ... | according | General Discussion | 2 | 12-27-2008 06:20 AM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us